<?php $cookie_file = 'cookie.txt'; $c = curl_init('http://cagefight.pl'); curl_setopt($c, CURLOPT_COOKIEJAR, $cookie_file); curl_setopt($c, CURLOPT_COOKIEFILE, $cookie_file); curl_setopt($c, CURLOPT_URL, 'http://cagefight.pl'); curl_setopt($c, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12;MEGAUPLOAD 1.0"); curl_setopt($c, CURLOPT_POST, 1); curl_setopt($c, CURLOPT_POSTFIELDS, 'email=*********&password=*********'); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_getinfo($c); $s = curl_exec($c); curl_close($c); ?>
A tutaj formularz z logowaniem na ich stronie:
<form action="" method="post"> <input type="submit" value="Zaloguj się" /> <input type="hidden" name="action" value="doLogin" /> <input type="hidden" name="session_id" value="e56ee88658e05f61da505f5321cc00ad" /> <input type="hidden" name="redirect" value="yes" /> <input type="hidden" name="autologin" value="yes" /> </form>
Nie potrafię się zabrać za to. Nie wiem które pola są najważniejsze aby się zalogować...