You are here: Accessing a remote webpage from php using sessions « PHP Language « IT news, forums, messages
Accessing a remote webpage from php using sessions

Posted by peter on 05/16/05 02:22

A friend of mines got a problem with his webpage and it seems to be
intermittently going weird but the cause of it seems random. To try and fix
it i've written a quick script to basicaly go through the pages continualy
until it finds an error page, writes a load of information to a file and
then carries on so i can have some kinda data to try and work out the cause.

So far i havent been getting anything but i've yet to be able to get the
page to screw up myself and it seems like it's a very random thing, but it'd
be nice to get rid of it. A lot of the pages on the site though are
restricted by a login and i'd like to include these in the spidering to
ensure it's looking at all possible problems. So... does anyone know of a
way to either fake cookies or sessions in php to a remote machine or to
login and for php to keep the sessions. I dont know if i'm making much
sense so i'll give a quick example below.

for ($counter... {

$page = file_get_contents($base_url.$counter);
if (page_is_weird($page)) {

do something....

}

}

This is run from the cli btw. Thanks for any help,

Peter

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация