![]() |
|
Creating a php file to fingerprint a user - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: PHP (https://sinister.ly/Forum-PHP) +--- Thread: Creating a php file to fingerprint a user (/Thread-Creating-a-php-file-to-fingerprint-a-user) |
Creating a php file to fingerprint a user - hacxx - 08-09-2017 Hi, I'm trying to use php to track visitors devices. The idea here is when a user visit the site the php script will try to reverse contact the ip and retrieve any information (example: html, warning messages or whatever the user has on port 80. I got the almost all done with the code but i just need some help with file_get_contents since it's not retrieving anything even if i point to a file location that exists. PHP Code: ...
$section = file_get_contents('$user_ip');
$ourFileName = "$user_ip";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fwrite($ourFileHandle, $section);
fclose($ourFileHandle);
?>Thanks RE: Creating a php file to fingerprint a user - hacxx - 08-09-2017 Using a snip code that was given by a member here in the forum. It's working ![]() but i still have a problem with fwrite($ourFileHandle, '$ch'); Warning: fwrite() expects parameter 2 to be string, resource given in... PHP Code: $ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://$user_ip:80");
$server_output = curl_exec ($ch);
curl_close ($ch);
$ourFileName = "$user_ip";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fwrite($ourFileHandle, '$ch');
fclose($ourFileHandle);
?> |