Jump to content

Logging / Public Results


Guest Anonymous

Recommended Posts

I ended up using

$ip = $_SERVER['REMOTE_ADDR'];

$fullhost = gethostbyaddr($ip);

$host = preg_replace("/^[^.]+./", "*.", $fullhost);

I put it in http://www.testmy.net/whois.php for testsing

you will see a portion that says "your host is ::*.ph.ph.Cox.net *** host of your query is :: *.chvlva.adelphia.net " (that is just what i got when I pulled your IP unstable)

But what I need to do is parse further and just get the end of that like instead of *.chvlva.adelphia.net it would say adelphia.net -- will just take me a little more to parse that down... :)

Well I'm glad I got you thinking. Odd thing is, when I'm at work I'm in a 128.128.0.0/16 all should be registered to Woods Hole. At home I'm on Verizon. So not sure where you pulled Cox from boss.

Link to comment
Share on other sites

I clicked the wrong user.. I can see now your on verizon

By the way, I just started logging users ISPs --- It still in beta, but you guys can test out the query script for host...

http://www.testmy.net/host_stats.php

just type your host and it should give averages... after the beta and bugging, I will of course have much more stat output... and comparison.

Hope everything works out, it looks like my SQL logs are going to grow faster in size... I am aproching 1 million entries without a problem.

Link to comment
Share on other sites

:) I'm certain I have seen this on sites that I have visited,I also think that Gibson's site called shield up does this during the testing and he has many other things for testing etc.........heres the link.......

http://www.grc.com/

I'll look further:)...If this shouldn't be here go ahead and snip......I haven't had a site in a long time but I think we used a pgm called (free) proxomitron to do this ..<<maybe not I will look and see if I can find:)

8) Microwave

Link to comment
Share on other sites

By the way' date=' I just started logging users ISPs --- It still in beta, but you guys can test out the query script for host...[/quote']

Tried "Chello" and I got 2 results, with an average of 910 Kbps. Can't wait to see what the separate scores were, cuz that sucks.

Idea:

When link member/ID is there you could add the advertised speeds that person has to see what's he/she/it getting compared to what he/she/it should be getting. It would be just another entry in the user profile.

Link to comment
Share on other sites

okay refined it a bit

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

}

$ipu=GetIPu();

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;

}

Nice reverse array now only outputs JUST the end of gethostbyaddr

Then on the mySQL end I am using varchar(20) -- max length of User_Host is 20 characters -- but that should be more than needed. This new code should protect the size of my database and pull better logs... we will see in time.

Link to comment
Share on other sites

I broke something. DId download test and went to beta-area and it displayed fine, said I haven't done an upload test yet...so I did. Then I went back and I get invalid query displayed.

nevermind...just realized I went to WHOIS.PHP rather than the hoststats.

Link to comment
Share on other sites

hehe... I think it's actually in a very stable beta stage now.

See, just give me an idea and I will make it a reality... I even converted d_load.cgi to php...... anyone who scripts out there can back me up on this on... that is a pain in the debugging ASS! ~~ But one down, many more to go.... just a few major ones though, then this site should get REALLY interactive after I tie everything together.

FUN FUN :roll: --- just kidding I live for this shit guys :wink: --- GEEK!

god damn my fingers hurt... :haha:

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...