Kod
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1"); // useragent
curl_setopt($ch, CURLOPT_REFERER, "http://www.ownserver.pl/index.php?opcja=zaloguj"); // referer
curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__).'/cookies.txt'); // ciacha
curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__).'/cookies.txt'); // ciacha
curl_setopt($ch, CURLOPT_POSTFIELDS, "zaloguj=true&login=$login_own&haslo=$haslo_own"); // wysyłanie danych post
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
curl_close($ch);
$ta = curl_init("http://www.ownserver.pl/index.php?klient=portfel&doladuj_sms"); // adres strony
curl_setopt($ta, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1"); // useragent
curl_setopt($ta, CURLOPT_REFERER, "http://www.ownserver.pl/index.php?klient=portfel"); // referer
curl_setopt($ta, CURLOPT_COOKIEFILE, dirname(__FILE__).'/cookies.txt'); // ciacha
curl_setopt($ta, CURLOPT_COOKIEJAR, dirname(__FILE__).'/cookies.txt'); // ciacha
curl_setopt($ta, CURLOPT_POSTFIELDS, "id_sms=$id_input&kod_zwrotny=$kod"); // wysyłanie danych post
curl_setopt($ta, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ta);
curl_setopt($ch, CURLOPT_REFERER, "http://www.ownserver.pl/index.php?opcja=zaloguj"); // referer
curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__).'/cookies.txt'); // ciacha
curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__).'/cookies.txt'); // ciacha
curl_setopt($ch, CURLOPT_POSTFIELDS, "zaloguj=true&login=$login_own&haslo=$haslo_own"); // wysyłanie danych post
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
curl_close($ch);
$ta = curl_init("http://www.ownserver.pl/index.php?klient=portfel&doladuj_sms"); // adres strony
curl_setopt($ta, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1"); // useragent
curl_setopt($ta, CURLOPT_REFERER, "http://www.ownserver.pl/index.php?klient=portfel"); // referer
curl_setopt($ta, CURLOPT_COOKIEFILE, dirname(__FILE__).'/cookies.txt'); // ciacha
curl_setopt($ta, CURLOPT_COOKIEJAR, dirname(__FILE__).'/cookies.txt'); // ciacha
curl_setopt($ta, CURLOPT_POSTFIELDS, "id_sms=$id_input&kod_zwrotny=$kod"); // wysyłanie danych post
curl_setopt($ta, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ta);