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