[lazarus] Sockets Linux OT
Brad Campbell
bcampbel at omen.net.au
Wed Aug 11 23:58:18 EDT 1999
At 22:07 11/08/99 -0500, you wrote:
>Does anyone know how to grab a web page from a web server using free pascal
>sockets under linux.
>
>Here is what I need to do.
>
>1. I have a server web cluster put together at work.
>
>2. It works great but I need something that can monitor the connected web
>servers for problems. The way I need to do it is just do a simple page
>request in some code and see if I get a return from the server on a timed
>loop.
>
>3. This utility will just then dynamically add or remove servers from the
>real server list.
>
>The contents of the page I get back from the server does not need to be
>processed I just have to know that I got it.
>
>Any Ideas?
>
>Cliff
Yeah, try this
Open a stream connection (ie like a telnet connection) to port 80 on the
server
and wait for a connection.. then send a string
GET /Filename HTTP/1.0
<Blank Line>
and the server will return the page to you.
ie for my homepage
telnet www.omen.net.au 80
<connect>
GET /~bcampbel/index.htm HTTP/1.0
<blank Line>
--------------------
spews out page here...
<disconnect>
It's that easy
Brad....
/"\
\ /
X ASCII RIBBON CAMPAIGN
/ \ AGAINST HTML MAIL
More information about the Lazarus
mailing list