bibio Posted March 25, 2005 CID Share Posted March 25, 2005 Hi! I am pretty new to broadband, I have had it only for 1 full week now. I am on DSL with sympatico.ca, and want to test my download speed. The test runs fine, but when the results are displayed, the script tells me my host is something like 132.276 or any weird IP adress not related to sympatico.ca I have observed, though, that this only happens when the other computer on my home LAN, which runs XP with S.P. 2, is running. When it is not running, the script on the page correctly detects that my I.S.P. is sympatico.ca. Does anyone have an idea of why does this happen? Quote Link to comment Share on other sites More sharing options...
CA3LE Posted March 25, 2005 CID Share Posted March 25, 2005 Hi! I am pretty new to broadband, I have had it only for 1 full week now. I am on DSL with sympatico.ca, and want to test my download speed. The test runs fine, but when the results are displayed, the script tells me my host is something like 132.276 or any weird IP adress not related to sympatico.ca I have observed, though, that this only happens when the other computer on my home LAN, which runs XP with S.P. 2, is running. When it is not running, the script on the page correctly detects that my I.S.P. is sympatico.ca. Does anyone have an idea of why does this happen? Well, it detects your host by a reverse lookup. It works fine for most people, but sometimes it will show a portion of your IP addy. If you are going through a router or gasteway this might be messing this up.... I have written in the code to do a quick check, meaning if it takes too long it will just give up (so that people don't have to wait around for a reverse DNS resolution) ~~ don't worry about it, you know who your host is and can still compare your score to your host by using the "host stats" tool ... just type "sympatico.ca" or look for it in the drop down box Quote Link to comment Share on other sites More sharing options...
just- Posted March 25, 2005 CID Share Posted March 25, 2005 cale couldnt u be using something like that Arin database ? Quote Link to comment Share on other sites More sharing options...
CA3LE Posted March 25, 2005 CID Share Posted March 25, 2005 cale couldnt u be using something like that Arin database ? takes too long to query ~~ I use gethostbyaddr($ip) this is the full code of getting someones IP then converting it to a host and dropping off un-needed data function GetIPu() { if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) $ipu = getenv("HTTP_CLIENT_IP"); else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) $ipu = getenv("HTTP_X_FORWARDED_FOR"); else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) $ipu = getenv("REMOTE_ADDR"); else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) $ipu = $_SERVER['REMOTE_ADDR']; else $ipu = "unknown"; return($ipu); } function get_isp($ip = '') { if (empty($ip)) { $ip = GetIPu(); } $longisp = gethostbyaddr($ip); $isp = explode('.', $longisp); $ispr = array_reverse($isp); $isp = $ispr[1].'.'.$ispr[0]; return $isp; } $host=get_isp(); [/code] If someone can tell me a better way to do it I am open for discussion Quote Link to comment Share on other sites More sharing options...
bibio Posted March 25, 2005 Author CID Share Posted March 25, 2005 Thanks a lot... I had figured that I could compare with the host stats section, I just wanted to know if it was an issue that had already happened... Again, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.