Jump to content

Craigslist Account Login Script Using Curl


tobydawson13

Recommended Posts

Hi there, I'm not a regular here at PhpFreaks, but I was wondering if someone could help me out with this script I've been working on. To login to Craigslist using php/curl.

 

Here's the code I have so far:

 

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://accounts.craigslist.org/login');
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'inputEmailHandle=myemail&inputPassword=mypassword');
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec ($ch);

curl_setopt($ch, CURLOPT_URL, 'https://accounts.craigslist.org');
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec ($ch);
echo $content;
curl_close ($ch);
?>

 

For your generousity in helping me out, I am more than willing to send a bit of paypal, to anyone who helps me out :)

Thanks.

  • 4 months later...

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.