simonp Posted July 8, 2010 Share Posted July 8, 2010 I need to be able to get some data from a URL and then split it up and assign variables. Eg: http://www.xxx.com/api?action=getPositions&key=xxxxxxxxxxxxxxxxxxxxx shows: XXXXXX API v1.00 key,label,timestamp,lat,long,altitude,speed,heading I need to be able to get that information and assign each item to a variable (there will only ever be one result). I think I need CURL for this maybe but don't really know where to start. Hope someone can help! Thanks Simon Quote Link to comment Share on other sites More sharing options...
shortysbest Posted July 8, 2010 Share Posted July 8, 2010 you can use $_GET['']; to do this. i.e http://www.xxx.com/api?action=getPositions&key=xxxxxxxxxxxxxxxxxxxxx $_GET['action']; would be "getPositions" or $_GET['key']; would be "xxxxxxxxxxxxxxxxxxxxx" Quote Link to comment Share on other sites More sharing options...
simonp Posted July 8, 2010 Author Share Posted July 8, 2010 x Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.