View previous topic :: View next topic |
Author |
Message |
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Tue Aug 07, 2007 6:14 pm Post subject: Web Server and Network Test |
|
|
People are always asking why their websites don't work and not giving any information, so I propose we send them to a test that will run a basic port scan and check if their web server is accessible on the internet. I have made such a script, its basic, but should help:
http://tools.randomresources.org/test.php
It will give whoever visits it something similar to:
Code: | ::Test Results::
Date: Aug 07, 2007 05:12 PM GMT
IP Address: 70.248.67.13
HTTP Default Port 80 is open.
Ports Open: 21 80 443
Ports Closed: 81 110 220 8080
Website found at 70.248.67.13:80
Server: Abyss/2.4.9.7b1-X2-Win32 AbyssLib/2.4.9.7
|
As you can see, it will tell their IP address, if port 80 is open, if a few other hosting-specific ports are open/closed, and if it is possible to retrieve the index page of their website. It also reports the Server header sent by the server.
If Aprelium would like the source code, I can give it to them and they could put something similar on their website. _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Aug 07, 2007 7:32 pm Post subject: |
|
|
That's a pretty nifty script you got there! It automatically checked the ports as I visted it. However, I do know how you created it. ;-) You used fsockopen() to check if the ports are open, and you used get_headers() PHP function or similar to grab the server information from their IP Address. Simple! |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Tue Aug 07, 2007 7:39 pm Post subject: |
|
|
Yeah, thats the basics of it. Any ideas? Other ports to add? _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Aug 09, 2007 12:45 am Post subject: Re: Web Server and Network Test |
|
|
rrinc,
Does it support HTTPS? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
ncwdavid -
Joined: 07 Aug 2007 Posts: 30
|
Posted: Thu Aug 09, 2007 12:49 am Post subject: |
|
|
please add port 25 for SMTP. |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Thu Aug 09, 2007 2:22 am Post subject: Re: Web Server and Network Test |
|
|
aprelium wrote: | rrinc,
Does it support HTTPS? | Well, it does check if port 443 is open.
ncwdavid, I just added port 25. _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Aug 16, 2007 3:53 pm Post subject: Re: Web Server and Network Test |
|
|
rrinc wrote: | Well, it does check if port 443 is open. |
But does it test if there is HTTP server there (as the information it gets with port 80)? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Fri Aug 17, 2007 4:07 am Post subject: |
|
|
No, but that can be easily added. I'll add that tomorrow. _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Thu Aug 23, 2007 11:35 pm Post subject: |
|
|
I forgot about this...
I was going to add a HTPS website check but it won't work, always fails. I'm doing the same thing as for the normal website test but using get_headers() with 'https://' instead of http://. _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Aug 30, 2007 3:41 pm Post subject: |
|
|
rrinc wrote: | I forgot about this...
I was going to add a HTPS website check but it won't work, always fails. I'm doing the same thing as for the normal website test but using get_headers() with 'https://' instead of http://. |
What is the error code or the error message that this function returns when accessing a HTTPS site? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Fri Aug 31, 2007 4:27 am Post subject: |
|
|
No error. I'm using file_get_contents('https://'.$ip)
$ip is equal to $_SERVER['REMOTE_ADDR'] (the visitor's IP). Then if that succeeds I do get_headers(). _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Fri Aug 31, 2007 6:43 pm Post subject: |
|
|
I ran your network test, and it lists ports 21, 80, 110, and 143 as both open and closed. :scratching head: _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Sat Sep 01, 2007 12:13 am Post subject: |
|
|
Hmm, I don't believe it had that problem awhile back...thats strange. I can't seem to figure out why its doing that, there was never an option to be on both lists, just one or the other (open or closed). Also it lists all the ports twice in the list of ports it tests. I'll try to fix it.
Edit: I had an issue where I just kept adding onto a static variable and not clearing it after each function call. It's fixed now.
Now, there's still the HTTPS issue... _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
|
|