"PHP" uses the Sina API interface and PHP to obtain remote data, obtain the IP address, and obtain the corresponding IP attribution location
This article and "Servlet" Javaweb, using the Sina API interface, obtain the IP address, and obtain the corresponding IP attribution "(click Open link) for the sister article, but the back-end programming language replaced by PHP.
Make the same effect, open the page, get the client's IP, and get the attribution of this IP using the Sina API interface.
As you can see, it is quite normal in IE6.
Directory structure as follows, very simple, the same two files, in fact, if you would like to write a PHP file can be, but the display layer and the logical business layer is not mixed together as well?
The only notable thing is that these two files can not be called ipget.php,ipget.html, although the suffix is different, but the prefix must not be the same,
Otherwise IE6 don't know why I can't answer this JSON.
Ipgetview.html and "Servlet" Javaweb, using the Sina API interface, obtain IP address, and obtain the corresponding IP attribution (click Open link) in the Display layer page is exactly the same, Sina API interface is identical, here no longer repeat.
Javaweb-ip QueryIp:
IP attribution to:
Later, ipgetdo.php, like the "PHP" login system and output browser information (click to open the link), the use of ${_server[' REMOTE_ADDR '} first obtain the user's IP, and then through the curl to remote data acquisition. PHP uses curl to get data remotely in the following format:
So ipgetdo.php code is as follows, get data, print it directly, let Ipgetview.html get it with Ajax.