Why post the actual link when you can redirect with a single stored link?
SQL setup –
Table `casinos`
id – Integer / 25 / auto Increment / Set as Key
name – VCHAR / 255
link – VCHAR /255
Create that and have all your casinos in there (create a form to add /edit)
Then instead of making your links full you can use the following
yourdomain.com/casinolink.php?id=10
then in casinolink.php
[PHP]
include(“../configuration.php”); // Get SQL access
$id = ( isset($HTTP_GET_VARS) ) ? intval($HTTP_GET_VARS) : 0; / Pull in ID $
$id=mysql_real_escape_string($id); // Clean the string in case someone injects in URL
$get_rows=mysql_query(“select * from casinos where id=’$id'”);
$get_url=@mysql_fetch_array($get_rows);
$clickurl=$get_url[link]; // pull link to the casino for that ID
header(“Location: $clickurl”); // Redirect user to the casino
?>
[/PHP]
Now you post this link all over your sites, and when you need to change the URL, you just update the database ONCE!
Please login or Register to submit your answer