Forum Moderators: coopster

Message Too Old, No Replies

php redirect script

php redirect script

         

scorp22nd

6:03 am on May 24, 2005 (gmt 0)

10+ Year Member



Hello I would like to create a script call goto.php that will redirect to a url specified in url like http:www.mysite.com/goto.php?url=http://www.linksite.com but would like to include a input variable in the script. Can you help me with this or point me in right direction. Thankyou.

dreamcatcher

7:14 am on May 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A simple version would be:

http:www.mysite.com/goto.php?url=http://www.linksite.com

goto.php:

<?php

$url = $_GET['url'];

header("Location: $url");

?>

Hopefully that gets you started.

dc

marius26

11:25 am on May 30, 2005 (gmt 0)

10+ Year Member



this script is exactly what i was looking for