Hi, I'm trying to login to hi5.com with Curl, im using the following but getting no luck at all , am i on the right track? <? $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://hi5.com/"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt'); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt ($ch, CURLOPT_HEADER, 1); $html = curl_exec($ch); echo $html; curl_close ($ch); ?> PHP:
You want to login, right? If so use this: <?php $post_stuff = 'email=test@example.com&password=PASSWORDOOOOO'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://hi5.com/friend/login.do'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_stuff); $html = curl_exec($ch); echo $html; curl_close ($ch); ?> PHP: Edit the line, $post_stuff to change to the login email/password. That should login for you . - JTD
Hi Grunt, your code to login in hi5 using cURL is 'Nice', How can i update my profile using cURL, any idea ? if so please provide me the specific code