Jump to content

HELP: Open external website using cookie info from php?


lowboy

Recommended Posts

I need to use php to open a forum website (fopen/copy, etc), grab the content, and then parse/do things with it.

The site uses a cookie-based login system. Once a user logs in it's the cookies which allow them to see the forum contents. Otherwise, there's a "not logged in" page that gets displayed.

So I need to somehow make php appear to be a browser with my stored login cookies. Is this doable?

Thanks,
Jason
Link to comment
Share on other sites

You can use [url=http://www.php.net/curl]cURL[/url] for that.
A good (and short) tutorial that will help you understand what cURL can do can be found [url=http://www.higherpass.com/php/Tutorials/Using-Curl-To-Query-Remote-Servers/]here[/url].

Good luck.

Orio.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.