Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Numer sesji a curl
crackcomm
post
Post #1





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


Witam, łączę się ze stroną cUrlem, i chcę wyciągnąć numer sesji

$ch = curl_init();
$url = 'http://google.pl';
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12;MEGAUPLOAD 1.0");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$site = curl_exec($ch);

to skrypt do łączenia się ze stroną
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 5)
bełdzio
post
Post #2





Grupa: Zarejestrowani
Postów: 690
Pomógł: 81
Dołączył: 6.04.2005
Skąd: Szczecin

Ostrzeżenie: (0%)
-----


zamien

Kod
curl_setopt($ch, CURLOPT_HEADER, 0);


na

Kod
curl_setopt($ch, CURLOPT_HEADER, 1);
Go to the top of the page
+Quote Post
crackcomm
post
Post #3





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


a jak np. "wyechowac" numer sesji
echo $?;
Go to the top of the page
+Quote Post
bełdzio
post
Post #4





Grupa: Zarejestrowani
Postów: 690
Pomógł: 81
Dołączył: 6.04.2005
Skąd: Szczecin

Ostrzeżenie: (0%)
-----


poczytaj o wyrażeniach regularnych (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
crackcomm
post
Post #5





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


Kod
HTTP/1.1 200 OK Date: Mon, 24 Mar 2008 14:32:28 GMT Server: Apache 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 Vary: Accept-Encoding Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8

nie ma tu sesji (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
Go to the top of the page
+Quote Post
bełdzio
post
Post #6





Grupa: Zarejestrowani
Postów: 690
Pomógł: 81
Dołączył: 6.04.2005
Skąd: Szczecin

Ostrzeżenie: (0%)
-----


a jesteś pewny, że sesja wystartowała? w nagłówkach powinieneś mieć lise ciastek
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.12.2025 - 16:43