我正在做一个像素追踪,但是当我试图让使用卷曲的HTTP头,它返回:不能得到HTTP标头在本地网络
Output http://image.prntscr.com/image/644e0c04a08e445c82e3381eed3b42f4.jpeg
当前代码:
3210我正在做一个像素追踪,但是当我试图让使用卷曲的HTTP头,它返回:不能得到HTTP标头在本地网络
Output http://image.prntscr.com/image/644e0c04a08e445c82e3381eed3b42f4.jpeg
当前代码:
3210PHP:
<?php
$file = fopen("results.txt", "a");
$ip = $_SERVER['REMOTE_ADDR'];
$date = date("r");
fwrite($file, "$ip from: $_SERVER['HTTP_REFERER'] at $date");
fclose($file);
$img = imagecreate(1,1);
$white = imagecolorallocate($img, 255, 255, 255);
imagesetpixel($img,1,1,$white);
header("content-type: image/jpg");
ob_clean();
imagejpeg($img);
imagedestroy($img);
'curl -I ...'不应该是二进制格式,因为那只是你使用curl的头文件 –
-I它表示输出是内联的 –
尝试用浏览器至少 –
@AnisRétro,什么web服务器? Apache的? Nginx的? PHP内置? – Devon
我实际上使用Apache –