Does anyone know how to make this work so that code can be on different servers using javascript or something. Working on same server is works fine, but now I am trying to make it so that I can use either this code or use javascript from this code so that I can place code on another index page on different servers. Hope I made sence.
<?
require_once "./admin/common.php";
dbconnect();
$query="SELECT url_id, url from url ORDER BY RAND()*weighting desc, impression desc limit 1";
$result = mysql_query($query) or die("Query failed");
if ($myrow = mysql_fetch_array($result)) {
$urlid=$myrow["url_id"];
$query1="update url set impression=impression-1 where url_id=$urlid";
mysql_query($query1) or die( "ERROR: " . mysql_error() . "\n");
$displayurl = $myrow["url"];
redirectTo($displayurl);
}
?>