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.
Recent comments
12 hours 38 min ago
12 hours 44 min ago
17 hours 42 min ago
1 day 23 min ago
1 day 1 hour ago
1 day 2 hours ago
1 day 6 hours ago
1 day 13 hours ago
1 day 17 hours ago
1 day 18 hours ago