我正在做一個像素追蹤,但是當我試圖讓使用捲曲的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 –