So i'm using this code (kinda taken from erect's post in the SEO Questions):
With my link above it in plain text (so it displays on the theme).
Speaking of which here's the code to display my link:
All well and good but i want to take it to the next level by adding the $url to a database, but only if it isn't already in there.
So, how do i check for duplicates in MySQL and add the $url if there are none?
PHP:
<?php
$ref = $_GET['url'];
$handle = fopen("/home/artofbam/public_html/trackthemes.html", "a");
fwrite($handle, $ref. '<br>');
fclose($handle);
?>
Speaking of which here's the code to display my link:
PHP:
<?php
$url = $_SERVER['HTTP_HOST'];
echo file_get_contents('http://www.mysite.com/abovefile.php?url=' . $url);
So, how do i check for duplicates in MySQL and add the $url if there are none?