Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Jak dowiedzieć się na jaką stronę przeniosło, poprzez cURL ?
kabzun
post
Post #1





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 24.12.2010

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


Witajcie,
powiedzmy, że mam takie linki:
strona.pl/go.php?i=3esdd
strona.pl/go.php?i=343
strona.pl/go.php?i=844


i taką funkcję

  1. $curl = curl_init();
  2. curl_setopt($curl, CURLOPT_URL, "");
  3. curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  4. curl_setopt($curl, CURLOPT_TIMEOUT, 25);
  5. $wynik = curl_exec($curl);
  6. curl_close($curl);


Jak dowiedzieć się na jaką stronę taki link przeniósł ? (strona z podstroną).

pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 4)
amii
post
Post #2





Grupa: Zarejestrowani
Postów: 728
Pomógł: 76
Dołączył: 12.06.2009

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


http://pl2.php.net/manual/en/function.curl-getinfo.php
?
Go to the top of the page
+Quote Post
kabzun
post
Post #3





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 24.12.2010

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


nie widzę tam nic o refererze ?
Go to the top of the page
+Quote Post
amii
post
Post #4





Grupa: Zarejestrowani
Postów: 728
Pomógł: 76
Dołączył: 12.06.2009

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


Referera odczytujesz z $_SERVER['HTTP_REFERER']
ale w funkcji nie widzę żebyś miał ustawioną stronę:
curl_setopt($curl, CURLOPT_URL, ""); //pusty
Go to the top of the page
+Quote Post
wookieb
post
Post #5





Grupa: Moderatorzy
Postów: 8 989
Pomógł: 1550
Dołączył: 8.08.2008
Skąd: Słupsk/Gdańsk




http://pl2.php.net/manual/en/function.curl-getinfo.php
A patrzałeś co jest w CURLINFO_EFFECTIVE_URL ?
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: 23.08.2025 - 06:47