A więc logowanie przy pomocy cURL pomyślne.
Jednak przy pisaniu tematu napotkałem na błędy.
vBulletin ma zabezpieczenia, trzeba podać czas/posthash/token.
a więc wszystkie dane są w inputach typu hidden więc:
$url3 ="http://www.fghfgh.nn/newthread.php?do=newthread&f=" . $row01; $ch2 = curl_init(); curl_setopt($ch2, CURLOPT_URL, $url3); curl_setopt($ch2, CURLOPT_POSTFIELDS, createPostString($postFields)); curl_setopt($ch2, CURLOPT_POST, 1); curl_setopt($ch2, CURLOPT_TIMEOUT, 70); curl_setopt($ch2, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch2, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch2, CURLOPT_COOKIEFILE, "cookies.txt"); curl_setopt($ch2, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)'); $result = curl_exec($ch2); curl_close($ch2); preg_match('#<input type="hidden" name="securitytoken" value="([0-9a-z\-]+)" />#', $result, $securitytoken); preg_match('#<input type="hidden" name="poststarttime" value="([0-9]+)" />#', $result, $poststarttime); preg_match('#<input type="hidden" name="loggedinuser" value="([0-9]+)" />#', $result, $loggedinuser);
skrypt niestety nie działa, preg_match nie wyciąga poprawnych danych.
Proszę o pomoc