> 
> Hi again, i forgot a detail, how can i keep the cookies? what i want
> is to make a script that get details from all my yahoo groups. First i
> login to yahoo and then file_get_contents('http;//groups.yahoo.com/')
> but the login session is not keeped. How can i solve this problem?
> Thanks.
> Cosmin
> 

First, you wouldn't want to do file_get_contents, you would want to do 
another PostPage('http://groups.yahoo.com','','',$cookie); That way it 
would set your cookies for that page and return the page. So in essence, 
it would do exactly as you would with file_get_contents, however it 
would set your cookie too.

Later on, make if nothing has stepped on your cookiefile, do:
$page = PostPage('http://groups.yahoo.com','','',$cookie); To get the 
page again without logging in.

If the cookies were initially created the first time you logged to the 
site, it would work again without the need to login.

Keep in mind, cookies will work just like they do in a browser so if 
they have a timeout after 5 minutes, for example, 5 minutes later they 
would no longer work and you would have to login again.

Reply via email to