RE: Creating a php file to fingerprint a user 08-09-2017, 08:48 PM
#2
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...

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);
?>