I want to get district name from the php library or online when enter pincode. because i don't have district name in my database. so please tell me logic or api name or library file.........
I'm assuming you're thinking of postal information here? Area-codes and -name/districts? If so, just get a hold of the dataset you need - usually it's available (for a fee) from the national post office in your region. If not, I'd recommend searching Google. If you can get a hold of the information, importing it into your database shouldn't be too hard.
The below php code might help you, <?php $pin = 'put here the pin code'; $get = 'http://pin-codes.in/api/pincode/'.$pin; $result = file_get_contents($get); for ($i=0;$i<30;$i++){ $homepage = strstr($result, '{'); $district = explode('District":"', $homepage); $district = explode('","State', $district[1]); $district = trim($district[0]);} echo "District: ".$district; ?> PHP: