Jump to content
Sign in to follow this  
fatkatie

login to a remote site with php; curl?

Recommended Posts

I'm a little familiar with Perl's lwp and I've scraped a few sites.  But I've never logged in remotely AND presented a 'protected' page to the user.

Is it possible to login remotely and then open a page for a user via a link?  We have the credentials but we're sick of the login dance.  I'll invest some time figuring it out if someone can tell me if this is even possible.

Thank you.

Share this post


Link to post
Share on other sites

It's not working , but after a login,  can it be this simple?

 


curl_setopt($ch, CURLOPT_URL, $gotoUrl);
$content = curl_exec($ch); 
echo $content;

 

Share this post


Link to post
Share on other sites

Op... I think I'm on my way.  Feel free to nuke the post if you wish.  Thank you.

Share this post


Link to post
Share on other sites

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.

Sign in to follow this  

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