Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 2nd May 2008, 12:05
jeetesting jeetesting is offline
Junior Member
 
Join Date: May 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need help with PHP script for IP address of sites

Need help with PHP script for IP address of sites

Hi All
I need some assistance with getting the IP address of a web site.

Basically I have to write a PHP page where if a site name is supplied it would return back the IP address of the site as well as specify if the IP Address is Dedicated for that site or a Shared IP Address

I have figured out how to get the IP address of a site in PHP however I am not able to figure out how can I find out whether that IP address is static i.e. dedicated IP for the site or a shared IP that the site is using.

Does anyone know how to get around this problem, using PHP how can I figure out if an IP address of the site is a Dedicated IP address for that site or whether that IP is a shared one.

Any help on this matter is appreciated

Cheers
Asif
Reply With Quote
Sponsored Links
  #2  
Old 2nd May 2008, 13:09
the_spy the_spy is offline
Member
 
Join Date: May 2007
Posts: 91
Thanks: 20
Thanked 6 Times in 6 Posts
Default

I don't think it's possible to know this, may be searching the string "dynamic" in the dns of the ip, but it's not always the case
Reply With Quote
  #3  
Old 7th June 2008, 04:22
opsys opsys is offline
Junior Member
 
Join Date: Oct 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use php_curl to save the contents of http://$IPADDRESS and
http://$SITENAME each to a separate file, run a diff on them, if they match, chances are its a dedicated IP address site.

Alex

Last edited by opsys; 7th June 2008 at 04:27.
Reply With Quote
  #4  
Old 7th June 2008, 10:30
TheRudy TheRudy is offline
Senior Member
 
Join Date: Dec 2005
Posts: 216
Thanks: 1
Thanked 7 Times in 5 Posts
 
Default

You have two choices really to find out if ip is dedicated or shared.

1. Use google and find for a tool that does this, parse the results with PHP. Lots of tools will do this search.

2. Use msn.com, type into search: ip:IP_ADDRESS and parse the results with PHP. This is the direct way as most of the 1. option tools use this option anyways If only one domain appears as a result you have a dedicated IP else its shared.

None of this two is of course 100% accurate but as far as i know this is the only way to do this.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 09:29
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 10:20
network issues now it says "401 The web site is blocked by administrator" Check General 3 26th February 2008 14:22
Apache2 Freezes celtic Server Operation 31 28th May 2007 17:18


All times are GMT +2. The time now is 02:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.