Does anybody have a working script that logs into myspace using cURL, so that you can use the server to check bulletin proofs instead of manually checking them.
Yeah I have a post that should help you... http://forums.digitalpoint.com/showthread.php?t=1313115 Try this code $ch = curl_init(); // SET URL FOR THE POST FORM LOGIN curl_setopt($ch, CURLOPT_URL, "http://domain.com/login.html"); // ENABLE HTTP POST curl_setopt ($ch, CURLOPT_POST, 1); // SET POST PARAMETERS : FORM VALUES FOR EACH FIELD curl_setopt ($ch, CURLOPT_POSTFIELDS, "username_box=username&password_box=password"); // IMITATE CLASSIC BROWSER'S BEHAVIOUR : HANDLE COOKIES curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookies/cookie".rand(11111111,99999999).".txt"); # Setting CURLOPT_RETURNTRANSFER variable to 1 will force cURL # not to print out the results of its query. # Instead, it will return the results as a string return value # from curl_exec() instead of the usual true/false. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FILE, $handle); // EXECUTE 1st REQUEST (FORM LOGIN) $store = curl_exec ($ch); // SET FILE TO DOWNLOAD curl_setopt($ch, CURLOPT_URL, "http://domain.com/inside/stats/bulletin_proofs.php"); // EXECUTE 2nd REQUEST (FILE DOWNLOAD) $content = curl_exec ($ch); PHP: $content should contain the entire page you wish to download. I'm not sure what bulletin proofs are so hopefully this will work! Regards, Tom Guilleaume
You may need to set more than just login_box=username&password_box=password you may also need to include sessions, change the cookie directory (make sure it exists), etc.