Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Aug : Re: How does a www server know it's not a web client?

www.cryer.info
Managed Newsgroup Archive

Re: How does a www server know it's not a web client?

Subject:Re: How does a www server know it's not a web client?
Posted by:"Jamie Dale" (j.da..@turboz.net)
Date:Sun, 6 Aug 2006 16:42:35

Actually I thought it was a case of the header sending the client type? -
like this:
Sent: User-Agent: Mozilla/3.0 (compatible; Indy Library)


Thats what my IdHTTP component sends in the header and I never get any
problems.

I'm pretty sure it's a user-agent issue that you need to specify. Thats
generally the main way that webservers determine the client that is
connected to it via http. Screen size, OS, and others are generally done by
cookies but for that reason, cookies can be disabled so that you do not
report this information back. The only general thing that is identified to
webservers is the User-Agent.

I'd suggest you try looking into this.

Jamie

"Francois PIETTE [ICS - MidWare]" <francois.piette@overbyte.be> wrote in
message news:44d5b1f2$1@newsgroups.borland.com...
>> I naively used Indy's Get() to download the contents of a web
>> site and parse out its data, but the server could tell it was a script
>> doing the navigation instead of a web browser.
>>
>> How does a server tell the difference? Because a navigator uploads
>> information such as the PC's OS, screen definition, etc? Is there a
>> way for Indy or any other Dephi-friendly Internet component to fake a
>> web client?
>
> You have to reproduce the exact same request as a browser is doing. Pay
> attention to header lines and cookies. Use a sniffer or other spy tool
> (such as SocketSpy http://www.overbyte.Be, follow UserMade link and then
> search SocketSpy) to see what request your browser really send and build
> the same. Cookies are a two step process: you go to some page, gran the
> cookie and then send the cookie back for other pages.
>
> Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
> --
> francois.piette@overbyte.be
> The author for the freeware multi-tier middleware MidWare
> The author of the freeware Internet Component Suite (ICS)
> http://www.overbyte.be

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive