Marcoteu Posted August 10, 2011 Share Posted August 10, 2011 Hello all, Can somebody help me how to retrieve a redirect Url with Php and Curl?? I've got some pseudo code here and this interesting link on: http://w-shadow.com/blog/2008/07/05/how-to-get-redirect-url-in-php/ 3 redirected (301) Urls go to one site www.url-1----> www.mysite.com www.url-2----> www.mysite.com www.url1-3----> www.mysite.com On www.mysite.com a Php script what retrieves the redirect Url: (www.url-1, www.url-2 or www.url-3) and put it in a $string. If $string = "www.url-1" echo "<style type="text/css"> #header { background: url(images/url1.gif) no-repeat top left; }</style>" else if $string = "www.url-2" echo "<style type="text/css"> #header { background: url(images/url2.gif) no-repeat top left; }</style>" else if $string = "www.url-3" echo "<style type="text/css"> #header { background: url(images/url2.gif) no-repeat top left; }</style>" Sorry for these pseudo code scribblings but I hope that it makes the idea a little bit clear! :-\ Regards, Marco Quote Link to comment Share on other sites More sharing options...
Marcoteu Posted August 10, 2011 Author Share Posted August 10, 2011 Webconfs.com has a online tool what is doing something similar. http://www.webconfs.com/redirect-check.php Too bad it isn't open source. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.