hello im graing content (links) from another site but when i do this the links look like http://www.e2tv.tv/validate/dir.php?http://www.phoenix-sports.t35.com/ so i will need a script that will redirect to the link after the ? eg http://www.phoenix-sports.t35.com/ How would i do this? Cheers Tom
I'm not really sure what you mean. Are you looking for a script that simply redirects you to the URL that is given in the Address bar? File name: dir.php <?php $loc = $_GET["loc"]; header("location: ".$loc.""); ?> PHP: http://www.yoursite.com/dir.php?loc=http://www.newsite.com Please note this script is not secure! Look up stripslashes
that does not work for http://www.e2tv.tv/validate/dir.php?http://tv3.us-sport.info/ any help just need it without the loc= Cheers Tom
Cause your URL is wrong. It has no parameter specified. You need to use http://www.e2tv.tv/validate/dir.php?loc=http://tv3.us-sport.info/
What is it that you're trying to do? Are you scraping links from another site or are you trying to write a script to redirect traffic?
Right i already have the links scaped you can see at e2tv.tv/ft.php but the links link to /validate/dir.php?http://tv3.us-sport.info/ so how would i create a dir.php to direct to the url without the loc= Cheers Tom
It's a little more challenging <?php $count = 0; foreach($_GET as $var => $val) { $link = $var; $count++; } if ($count == 1) { header("location: " . $link); } else { echo "An error occured!"; } ?> PHP: untested, and probably not the most elegant solution, but it'll work.
does not work, http://www.e2tv.tv/validate/dir.php?http://tv3.us-sport.info/ show blank page and http://www.e2tv.tv/validate/dir.php?http://new.vexcast.com/watch-p2p=EOYCMWEOY redirects to http://www.e2tv.tv/validate/EOYCMWEOY