Jump to content

Reading remote websites that use cookies?


Strahan

Recommended Posts

Hi.  I want to read a website remotely via PHP.  Problem is, it requires login.  I can log in by opening the URL with the querystring setup to do a login, and that works but when I send the next query to get data it acts like I never logged in.  I assume that's because it sets a cookie or something that isn't persisting. 

 

Is there any way around that?  Thanks!

You'll want to use the PHP cURL library...

 

http://uk2.php.net/manual/en/ref.curl.php

 

You'll need to use the curl_setopt (http://uk2.php.net/manual/en/function.curl-setopt.php) function after curl_init to allow it to use cookie sessions.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.