Código PHP:
<?php
Header ("Content-type: image/png");
$img_handle = imageCreateFromPNG("http://link.com.br/imagem.png");
ImagePng ($img_handle);
ImageDestroy ($img_handle);
$myFile = "ips.txt"; // local onde vai guardar os ips
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = $theData."\n";
fwrite($fh, $stringData);
$stringData = $_SERVER['REMOTE_ADDR'];
fwrite($fh, $stringData);
fclose($fh);
?>
Comment