I would like to mirror an image using a modified url in a forum topic that allows image tags so I can track it's visitors in cpanel stats as a normal php page.
ie: domain/image.jpg.php
`[img]
http://domain/image.jpg.php[/img]`I have tried a few aproches but none seem to work at all.
`
<?php
$url = '
http://www.tuning.aerograf.adrianmoisa.ro/1-capota-bmw-318-tunat-aerograf-3.jpg.php';
$img = '1-capota-bmw-318-tunat-aerograf-3.jpg';
file_put_contents($img, file_get_contents($url));
?>
<?php
/*$ch = curl_init('
http://www.tuning.aerograf.adrianmoisa.ro/1-capota-bmw-318-tunat-aerograf-3.jpg.php');
$fp = fopen('1-capota-bmw-318-tunat-aerograf-3.jpg', 'wb');
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);*/
?>
<?php /*
$contents = file_get_contents('
http://www.tuning.aerograf.adrianmoisa.ro/1-capota-bmw-318-tunat-aerograf-3.jpg');
$fp = fopen('/1-capota-bmw-318-tunat-aerograf-3.jpg', 'w');
fwrite($fp, $contents);
fclose($fp); */
?>
`
Comments
I thought that by making a subdomain which would be monitored trough Cpanel awstats I can get a prety acurate image about how many people read my ads.
The problem is that every monitoring software that tracks my website (google analytics, cpanel awstats and trafic.ro) displays informations only about php links.
I see that the rss feeds have a .php link and yet feedburner reads them. Also sitemap is not .xml but google has no troble with it. Can this method be aplied to .jpg files ?