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

c++ - Function signature as a function template parameter -

How to call a javascript function after the page loads with a chrome extension? -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -