You can use PHP to create redirects to other pages or websites.
This is quite useful if you do any kind of affiliate marketing and hate the ugly links provided - use the Header command to clean ‘em up!
<?php
header (“Location: http://linktoredirect.com”);
?>
When a viewer visits this PHP page in their browser, they will be redirected to the link reflected in the “Location” part of the code.
This is a good method to use, since other redirect methods using HTML and Javascript can easily be blocked.
Header can be used for other functions, but this is one of the more common uses, so we’ll leave it at that for now.
0 Comments
Leave a Reply. |
David Rentson
If this free PHP and MYSQL Tutorial is helpful for you... Great! Archives
October 2008
Categories
All
|