On my website I track clicks out using a redirect page that counts the clicks on a seperate php file, it "redirects and logs" ...
so i was wondering if a link pulled from database, using a redirect php script = influences link juice.
for example if I link to netbuilders url : NetBuilders - We Build The Net
The actual link you click might be :
Code:
http://www.webhost-choice.com/32-netbuilders/
which then calls a php script and pulls the actual link from a database .
This is the code I use if anyone is wondering how this works on coding level if you want to use it, you may
, you may also spread the code, but please leave the credits inside
PHP Code:
<?php
// Link out script V1.0
// Programmer : Sven Vranken.
// Contact synbitz@gmail.com.
// This code is written for http://www.webhost-choice.com.
// Modification to work on your website is allowed and free for anyone.
// This code is opensource, spreading is allowed.
// but the credits above must be be kept in the script file.
include_once('config.php');
include_once('Functions/General.php');
$database = 'example';
if (isset($_GET['name']))
{
$string = $_GET['name'];
$data = split('[-]', $string);
$Host_Exists = RecordExists($data[0],'hosts',$DB_FreeHosting,$DB_Host,$DB_User,$DB_Password);
if ($Host_Exists == false)
{
header("location:$baselink/sendsucces.php?referrer=brokenlink");
}
else
{
$IP = $_SERVER['REMOTE_ADDR'];
$query = "SELECT * FROM hitsout WHERE ip='$IP' AND freehost_id=$data[0]";
// check if IP already clicked this link on page ( COUNT UNIQUE IP's ONLY )
DB_CONNECT($DB_FreeHosting,$DB_Host,$DB_User,$DB_Password);
$result = mysql_query($query);
DB_DISCONNECT();
if (mysql_num_rows($result) == 0)
{
DB_CONNECT($DB_FreeHosting,$DB_Host,$DB_User,$DB_Password);
mysql_query("INSERT INTO hitsout (IP,name,freehost_id,date) VALUES ('$IP','$data[1]','$data[0]',now())");
DB_DISCONNECT();
$_SESSION['id'] = $id;
$_SESSION['name'] = $_GET['name'];
}
// GET LINK FROM DIFFERENT TABLE
$query = "SELECT * FROM hosts WHERE id=$data[0]";
DB_CONNECT($DB_FreeHosting,$DB_Host,$DB_User,$DB_Password);
$result = mysql_query($query);
DB_DISCONNECT();
$OK = mysql_fetch_array($result);
header("location:$OK[link]");
}
}
Bookmarks