ClioSport.net

Register a free account today to become a member!
Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

PHP Help.



Typhoon

Gangsta
ClioSport Moderator
My IP logger on my website sometimes fails to capture certain ones, anyone see a flaw in my code?

Code:
<?php

$v_ip = $_SERVER['REMOTE_ADDR'];
$v_date = date("l d F H:i:s");

$fp = fopen("hidden_text_file_that_i_wont_name.txt", "a");
fputs($fp, "IP: $v_ip - DATE: $v_date\n\n");
fclose($fp);

?>
 

Typhoon

Gangsta
ClioSport Moderator
Yeah, I've written a few lines to determine mobile ISP+IP addresses, but sometimes it's not even showing an IP address at-all, even if it is someone hidden behind a VPN/VPS/SOCK5s.

Code:
IP:  - DATE: Thursday 10 January 11:03:12
 
It should always be set to something - it's set by apache to the IP address the TCP request came from
Only time it's not set as far as I know is if the php script is run from command line/shell
 

Typhoon

Gangsta
ClioSport Moderator
yeah, that's whats confusing me to be honest, can't find any errors for it not to display anything.

the script is being run from root.
 
That's very very strange. Only time it should do that really is if it's not being called by apache

Edit: Wait what? It's being run from root? What do you mean?
 


Top