Próbuje zrobić abym przez curla mógł wysyłać posty na php by przemo.
Ale aby to zrobić najprawdopodobniej postem musze przesłać "SID" , który generowany jest w headerze " Set-Cookie: bb038dfef1_sid=ef91cd3f32fab50d8c45c64ec4503d7a;"
Tekst pogrubiony musze wrzucić w zmienną post "sid"..
Aktualnie mam tak pisanie postów:
$ch2 = curl_init("http://bezreklamy.eu/posting.php?mode=newtopic&f=97"); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, false); curl_setopt($ch2, CURLOPT_HEADER, true); curl_setopt($ch2, CURLOPT_COOKIEFILE, $filename); curl_setopt($ch2, CURLOPT_COOKIEJAR, $filename); // tutaj cookie juz uzupełnione przez logowanie curl_setopt($ch2, CURLOPT_REFERER, ""); curl_setopt($ch2, CURLOPT_USERAGENT, $useragent); // mozilla firefox $post2['subject'] = 'test'; // nazwa tematu $post2['message'] = 'tescik'; // tresc tematu $post2['mode'] = 'newtopic'; // mode $post2['post_parent'] = '0'; // zmienna ukryta $post2['f'] = '97'; // zmienna ukryta $post2['sid'] = 'cos'; // no moj kochany sid curl_setopt($ch2, CURLOPT_POSTFIELDS, prepare_request($post2)); curl_setopt($ch2, CURLOPT_FOLLOWLOCATION, TRUE); curl_exec($ch2); curl_close($ch2);
No i wyświetla się strona z tworzeniem tematu.
Pozdrawiam.