PHP cURL redirect
Posted: Wed Sep 23, 2009 4:14 pm
I'm trying to use cURL to redirect the user from my page to another site, but the new URL does not display in the address bar.
For example, http://www.foo.com/transfer.php should redirect the user to http://www.bar.com/index.php. The following code fetches bar.com/index.php, but still displays foo.com/transfer.php in the address bar.
I want to completely transfer control to the new site. Any suggestions? Here's the code that I'm using.
For example, http://www.foo.com/transfer.php should redirect the user to http://www.bar.com/index.php. The following code fetches bar.com/index.php, but still displays foo.com/transfer.php in the address bar.
I want to completely transfer control to the new site. Any suggestions? Here's the code that I'm using.
Code: Select all
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://www.google.com");
curl_exec ($ch);
curl_close ($ch);