[Tutor] Writing a web bot.

Mark D. Holbert mark@azcrew.org
Sat, 8 Jul 2000 16:03:24 -0700


Correct me if I'm wrong, but persistent connections in PHP have to do with
opening a connection between the Web Server and the Database that may be
used by multiple connections.  This allows the Web Server (e.g. Apache) to
open a single connection to the database (e.g. MySQL) instead of going
through the process of opening a connection, run SQL statement, close
connection every time someone hits a page that need to access data.  We have
found that it doesn't make that big of a difference on a low traffic web
site, but I imagine that it would if you were serving 1000's of pages every
hour.

Mark Holbert

>Message: 15
>Date: Sat, 08 Jul 2000 06:41:53 -0700
>From: KeithSmith <compunerd@gci-net.com>
>To: plug-discuss@lists.PLUG.phoenix.az.us
>Subject: Re: FW: [Tutor] Writing a web bot.
>Reply-To: plug-discuss@lists.PLUG.phoenix.az.us
>
>I may be wrong however I think I saw something on
>http://www.devshed.com/ that talked about PHP and how to create a
>persistent connection.
>
>Maybe someone on the list that knows PHP can set the record straight.
>
>Hope this helps,
>Keith
>
>
>
>Mike Sheldon wrote:
>>
>> Actually, HTTP does work that way. You can retrieve multiple files
through a
>> single connection.
>>
>> Michael J. Sheldon
>> Internet Applications Developer
>> Phone: 480.699.1084
>> http://www.desertraven.com/
>> PGP Key Available on Request
>>
>> -----Original Message-----
>> From: plug-discuss-admin@lists.PLUG.phoenix.az.us
>> [mailto:plug-discuss-admin@lists.PLUG.phoenix.az.us]On Behalf Of Rod
>> Roark
>> Sent: Friday, July 07, 2000 18:13
>> To: plug-discuss@lists.PLUG.phoenix.az.us
>> Subject: Re: FW: [Tutor] Writing a web bot.
>>
>> HTTP doesn't work that way.  The server is going to kill the connection
>> after responding to each request.
>>
>> -- Rod
>> ----------------------------------------------------------------------
>> Sunset Systems                           Preconfigured Linux Computers
>> http://www.sunsetsystems.com/                      and Custom Software
>> ----------------------------------------------------------------------
>>
>> On Fri, 07 Jul 2000, you wrote:
>> > Hi all.
>> >
>> > It appears I have found myself in a position
>> > where I could use some help.
>> >
>> > The task I am trying to perform is write an
>> > internet bot.  I was going to use urllib for
>> > this project however one of the requirements
>> > is for the connection to be continuous during
>> > the session.
>> >
>> > Connect to a site.
>> > Get page, parse.
>> > Get another page, parse.
>> > use POST method, get another page, parse.
>> > Disconnect from the site.
>> >
>> > The connection is not supposed to be dropped
>> > between the requests.
>> >
>> > Is there a simple way to do this task???
>> >
>> > thanks.