nachtegaal9999 Posted July 29, 2009 Share Posted July 29, 2009 Hi I have a issue and do'nt know how to solve it.If someone fills in his zipcode on my webpage i want to get the coordinates of that locoation.I only want to retrieve the information from the website below, and not open the website.http://www.gpscoordinaten.nl/bepaal-gps-coordinaten.phpstraat postcode of plaats --> input : 1628DC (= Zip code) --> result : 52.65614, 5.08390 (=coordinates of zipcode location)I am able to put the information in my database.Who can give me a hint to solve this problem, I'll hope someone can help me.Best RegardsSimon BuijsNetherlands Link to comment Share on other sites More sharing options...
justsomeguy Posted July 29, 2009 Share Posted July 29, 2009 I can't read Dutch, so find out if that site has an API or web service you can use to convert the zip code. Link to comment Share on other sites More sharing options...
nachtegaal9999 Posted July 30, 2009 Author Share Posted July 30, 2009 I can't read Dutch, so find out if that site has an API or web service you can use to convert the zip code.Hi, Of course i want to convert the zip code, but that is not the main issue,The issue is : is it possible to put xyz value on a website , and get the information from the answer fieldto my website so that i can put it in my sql database.Must i use iframe ? for example or are there other ways to get the solution.Thanks in advanceSimon Buijs Hoorn Netherlands Link to comment Share on other sites More sharing options...
justsomeguy Posted July 30, 2009 Share Posted July 30, 2009 Yeah, you can use CURL to send a post request to the other server, get the response from the server, parse the response up to find the information you're looking for, and do whatever you want with it. If they ever change the structure of their site, then you need to change your parsing code to handle that.Or, you can find out if they publish an API to do all of that and just use the API like they intend. Like I said, I can't read Dutch so I don't know if they have an API to use. Link to comment Share on other sites More sharing options...
nachtegaal9999 Posted July 31, 2009 Author Share Posted July 31, 2009 Yeah, you can use CURL to send a post request to the other server, get the response from the server, parse the response up to find the information you're looking for, and do whatever you want with it. If they ever change the structure of their site, then you need to change your parsing code to handle that.Or, you can find out if they publish an API to do all of that and just use the API like they intend. Like I said, I can't read Dutch so I don't know if they have an API to use.Thanks for your reply, Sorry I am a newbee about using CURL, can you give me a referential or tel me how CURL worksYou haven't to learn Dutch!! Thanks in advance for your guidance!!Simon BuijsNetherlands Link to comment Share on other sites More sharing options...
Synook Posted August 1, 2009 Share Posted August 1, 2009 http://www.php.net/manual/en/book.curl.php Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.