home *** CD-ROM | disk | FTP | other *** search
- redir.php3
-
- a simple redirection script for use with forms or..?
-
-
-
- <?php
- // ---------------------------------------------------------------------
- // a working example is at http://demonx.dhis.org/redir.php3
- // a simple redirection script, examples of usage:
- // http://whateveryoursiteis.com/redir.php3?url=http://www.php.net
- // or several html forms work as well,
- // <form method="POST" action="http://whatever.com/redir.php3">
- // <SELECT NAME="url">
- // <option value="http://mysite.com">whois.php3">Domain lookup</option>
- // <option value="http://mysite.com/bleh.phtml">somthing</option>
- // etc........
- // you get the picture :) problems? mail gh0ul@FireStar.org
- // or visit http://www.linuxfreak.org
- // ---------------------------------------------------------------------
-
- if ($url) {
- header( "Location: $url");
- }
- echo "<html><head>\n";
- echo "<title>PHP3: Website redirection script</title></head>";
- echo "<b>redirect to?</b><br>\n";
- echo "<form action=redir.php3>\n";
- echo "
- <input type=text size=40 name=url value=http://>
- <input type=submit name=submit value=submit><br>";
- echo "</p></form>\n";
- echo "</html>";
- ?>
-