curl - Getting the URL of redirected page - PHP -


i have url i'm trying redirected page: http://www.hotukdeals.com/visit?m=1650&q=1542029

i tried:

$ch1 = curl_init("http://www.hotukdeals.com/visit?m=1650&q=1542029");      curl_setopt($ch1, curlopt_followlocation, true);     curl_setopt($ch1, curlopt_nobody, true);     curl_exec($ch1);     $curl_url = curl_getinfo($ch1, curlinfo_effective_url);     echo $curl_url; 

i'm getting response, same url:

http://www.hotukdeals.com/visit?m=1650&q=1542029

how can work?

thank you.

this should work in cases, unless redirect made javascript.

print_r(get_headers('http://www.hotukdeals.com/visit?m=1650&q=1542029')); 

Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -