note 104312 added to function.curl-setopt

From: Date: Wed, 08 Jun 2011 11:47:17 +0000
Subject: note 104312 added to function.curl-setopt
Groups: php.notes 
Request: Send a blank email to php-notes+get-180327@lists.php.net to get a copy of this message
I am using a script to redirect one page but it is not changing the URL on address bar of the browser. Is there any way to do this. My script is: <?php echo geturl('http://www.whatsmyip.org/more/', 'http://www.google.com'); function geturl($url, $referer) { $headers[] = 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg'; $headers[] = 'Connection: Keep-Alive'; $headers[] = 'Content-type: application/x-www-form-urlencoded;charset=UTF-8'; $user_agent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)'; $process = curl_init($url); curl_setopt($process, CURLOPT_HTTPHEADER, $headers); curl_setopt($process, CURLOPT_HEADER, 0); curl_setopt($process, CURLOPT_USERAGENT, $useragent); curl_setopt($process, CURLOPT_REFERER, $referer); curl_setopt($process, CURLOPT_TIMEOUT, 30); curl_setopt($process, CURLOPT_RETURNTRANSFER, 0); curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1); $return = curl_exec($process); curl_close($process); return $return; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 61.246.5.111 ---- Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php Edit -- https://master.php.net/note/edit/104312 Del: integrated -- https://master.php.net/note/delete/104312/integrated Del: useless -- https://master.php.net/note/delete/104312/useless Del: bad code -- https://master.php.net/note/delete/104312/bad+code Del: spam -- https://master.php.net/note/delete/104312/spam Del: non-english -- https://master.php.net/note/delete/104312/non-english Del: in docs -- https://master.php.net/note/delete/104312/in+docs Del: other reasons-- https://master.php.net/note/delete/104312 Reject -- https://master.php.net/note/reject/104312 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#180327) next »