<? $hand = curl_init(); $url = 'http://board.info.pl/ucp.php?mode=login'; curl_setopt($hand, CURLOPT_URL, $url); curl_setopt($hand, CURLOPT_HEADER, 1); curl_setopt($hand, CURLOPT_RETURNTRANSFER, 1); curl_setopt($hand, CURLOPT_USERAGENT, "Mozilla/5.0"); curl_setopt($hand, CURLOPT_REFERER, 'http://board.info.pl/ucp.php?mode=login'); curl_setopt($hand, CURLOPT_COOKIESESSION, 1); $site = curl_exec($hand); curl_close($hand); //$username = 'login'; //$password = 'hasło'; $post = 'ucp.php?mode=login username=login&password=hasło&redirect=index.php&login=Zaloguj' ; $hand = curl_init(); 'Host: board.info.pl', 'User-Agent: Mozilla/5.0', 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language: pl,en-us;q=0.7,en;q=0.3', 'Accept-Encoding: gzip,deflate', 'Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7', 'Keep-Alive: 300', 'Connection: keep-alive', 'Referer: <a href="http://board.info.pl/ucp.php?mode=login'" target="_blank">http://board.info.pl/ucp.php?mode=login'</a> ) ); curl_setopt($hand, CURLOPT_URL, 'http://board.info.pl/ucp.php?mode=login'); curl_setopt($hand, CURLOPT_POST, 1); curl_setopt($hand, CURLOPT_POSTFIELDS, $post); curl_setopt($hand, CURLOPT_RETURNTRANSFER, 1); $site = curl_exec($hand); curl_close($hand); ?>
I zwraca: http://mazishare.co.cc/zobaczymy.php
Wiecie co robię źle?