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.
Thread Tools Display Modes
Old 2nd May 2008, 13: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

Reply With Quote
Sponsored Links
Old 2nd May 2008, 14:09
the_spy the_spy is offline
Join Date: May 2007
Posts: 91
Thanks: 20
Thanked 6 Times in 6 Posts

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
Old 7th June 2008, 05:22
opsys opsys is offline
Junior Member
Join Date: Oct 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

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.


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

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


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 10:29
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 11:20
network issues now it says "401 The web site is blocked by administrator" Check General 3 26th February 2008 15:22
Apache2 Freezes celtic Server Operation 31 28th May 2007 18:18

All times are GMT +2. The time now is 10:12.

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