[thelist] Server Script Reading HTML

Jay Blanchard jay.blanchard at niicommunications.com
Tue Aug 20 13:43:01 CDT 2002


[snip]
I have to code some server side scripts which have a requirement to read
some web pages via HTTP and take action depending on what it finds. I am
thinking perl would be the best way to go however I have not done anything
like this with perl before, in fact I've only done this before with VB. The
tricky part is that the script I code must be able to give a certain user
agent aswell as a specific referer.

Can anyone point me in the right direction for help / tutorials for this
kind of thing.
[/snip]

Chris,

PERL will work for this, but if you want a learning curve that might be less
steep you may want to consider PHP. As an example;

fopen("http://www.whatever.com", "r"); opens file for reading
while(!feof){
   compare stuff;
   do stuff;
   other stuff;
}

Server agent variables and referrer variables are held in easy to access
arrays. Check out http://www.php.net
PHP is open source, and better yet FREE. It'll work on any platform you can
imagine and moving scripts from one platform to another is pretty much a
no-effort job. Add to that -> PHP can compiled as a stand alone executable
so you can run scripts from the command line or via scheduling (like CRON).
Another plus is the relatively new PHP-GTK which will allow developers to
create stand-alone, compiled applications using PHP.

HTH!

Jay







More information about the thelist mailing list