Hi all
I'm trying to automatically log in to www.meetup.com without much success:-
This is my code:-
<?
$username="[email protected]";
$password="123abc";
$url="http://meetup.com";
$cookie="cookie.txt";
$postdata = "email=". $username ."&password=". $password . "&submitButton=Login";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url . "/login");
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt ($ch, CURLOPT_REFERER, "http://www.meetup.com/");
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt ($ch, CURLOPT_POST, 1);
$result = curl_exec ($ch);
curl_close($ch);
echo $result;
exit;
?>
No joy - any ideas?
Thanks
Jonathan