Web Server and Network Test

 
Post new topic   Reply to topic    Aprelium Forum Index -> Networking Issues
View previous topic :: View next topic  
Author Message
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Tue Aug 07, 2007 6:14 pm    Post subject: Web Server and Network Test Reply with quote

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 View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Aug 07, 2007 7:32 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Tue Aug 07, 2007 7:39 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Aug 09, 2007 12:45 am    Post subject: Re: Web Server and Network Test Reply with quote

rrinc,

Does it support HTTPS?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
ncwdavid
-


Joined: 07 Aug 2007
Posts: 30

PostPosted: Thu Aug 09, 2007 12:49 am    Post subject: Reply with quote

please add port 25 for SMTP.
Back to top View user's profile Send private message
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Thu Aug 09, 2007 2:22 am    Post subject: Re: Web Server and Network Test Reply with quote

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 View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Aug 16, 2007 3:53 pm    Post subject: Re: Web Server and Network Test Reply with quote

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 View user's profile Send private message Send e-mail
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Fri Aug 17, 2007 4:07 am    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Thu Aug 23, 2007 11:35 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Aug 30, 2007 3:41 pm    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Fri Aug 31, 2007 4:27 am    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
pkSML
-


Joined: 29 May 2006
Posts: 952
Location: Michigan, USA

PostPosted: Fri Aug 31, 2007 6:43 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Sat Sep 01, 2007 12:13 am    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Networking Issues All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group