BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

retrieving data from website

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Alfred
Guest





PostPosted: Thu Dec 30, 2004 2:58 pm    Post subject: retrieving data from website Reply with quote




Hi,
I try the follwoing code but it cause an exception class EldProtocolReplyError with message '301 Moved Permanently'.

What does the error mean?
Did I use the Get function wrongly?

I am already connected to the internet when i execute the code above. I using delphi 6 to write the program and the website is ok if i open using Internet Explorer.

Code:
IEAddress := http://itable.finance.yahoo.com/table.csv?s=BRY.SI&a=11&b=1&c=2004&d=11&e=30&f=2004&g=d&ignore=.csv;

SL.Text := idHttp1.Get(IEAddress);
SL.SaveToFile((GetCurrentDir,1,3));

Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Dec 30, 2004 6:51 pm    Post subject: Re: retrieving data from website Reply with quote




"Alfred" <han_smurf80 (AT) yahoo (DOT) com.sg> wrote


Quote:
What does the error mean?

The error tells you what the exact problem is. You requested a URL that no
longer exists, the requested file has been moved to a new URL.

Quote:
Did I use the Get function wrongly?

No. But you probably did not set the HandleRedirects property to true so
that Get() would retry the request with the new URL that the server
provides.


Gambit



Back to top
Alfred
Guest





PostPosted: Fri Dec 31, 2004 3:37 am    Post subject: Re: retrieving data from website Reply with quote




Ok. My HandleRedirects property was set to false. Thanks a lot! :)

"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote:
Quote:

"Alfred" <han_smurf80 (AT) yahoo (DOT) com.sg> wrote in message
news:41d417b1$1 (AT) newsgroups (DOT) borland.com...

What does the error mean?

The error tells you what the exact problem is. You requested a URL that no
longer exists, the requested file has been moved to a new URL.

Did I use the Get function wrongly?

No. But you probably did not set the HandleRedirects property to true so
that Get() would retry the request with the new URL that the server
provides.


Gambit




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.