od 2 dni usiłuję wyklonać logowanie poprzez CURL do serwisu seans24.pl i co tu dużo mówić po prsotu mi to nie wychodzi. Przeczytałem kupe tutoriali, podstawialem wiele skryptów oraz pisałem wszystko od nowa i nic. Cały czas logowanie się nie wykonuje.
Moje wypociny:
<?php $curl = curl_init('http://seans24.pl/login.php'); curl_setopt($curl, CURLOPT_HEADER, 1); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_COOKIEFILE, "cookie.txt"); curl_setopt($curl, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($curl, CURLOPT_POSTFIELDS, "login=L&pass=P"); $xxx = curl_exec($curl); curl_close ($curl); ?>
Oraz plik coocie.txt
http://curl.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.
www.seans24.pl FALSE / FALSE 0 PHPSESSID 55db4fa86c73f040b46504247d721ab4">
# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.
www.seans24.pl FALSE / FALSE 0 PHPSESSID 55db4fa86c73f040b46504247d721ab4
Nagłówek
HTTP/1.1 301 Moved Permanently Location: <a href="http://www.seans24.pl/login.php" target="_blank">http://www.seans24.pl/login.php</a> Content-Length: 0 Date: Tue, 21 Jun 2011 06:24:52 GMT Server: www HTTP/1.1 200 OK Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-type: text/html Transfer-Encoding: chunked Date: Tue, 21 Jun 2011 06:24:52 GMT Server: www
Proszę o pomoc, co robię źle?