 <p>use this</p> <pre><code>&lt;?php $name="19875379"; $url = "http://www.ikea.co.il/default.asp?strSearch=".$name; $ch = curl_init(); $timeout = 0; curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_HEADER, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $header = curl_exec($ch); $redir = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); //print_r($header); $x = preg_match("/&lt;script&gt;location.href=(.|\n)*?&lt;\/script&gt;/", $header, $matches); $script = $matches[0]; $redirect = str_replace("&lt;script&gt;location.href='", "", $script); $redirect = "http://www.ikea.co.il" . str_replace("';&lt;/script&gt;", "", $redirect); echo $redirect; ?&gt; </code></pre> <p><a href="http://stackoverflow.com/questions/20582717/get-the-last-redirected-url-in-curl-php">enter link description here</a></p>