(I am using json with PHP)
Hi i have got a url, from some web service saying:
http://www.example.com?username=$username&password=$password&fname=firstname
Now they said they i can get data with xml or json to retrieve data along with passing my username and password. And when i googled found json is better option. Now i hv done doing json and received the required data successfully.
But i can see all the javascript i hav used to fetch in view-source of page. And so is the username with password.
I am a new programmer when it comes to use json or say fetching data with REST.
Can anyone just let me know the basic idea, that will be enough for me.
What you need to do then is get that URL with PHP. To do this, cURL is most commonly used:
You should see the data from that URL with your code. Now, since it is JSON, we need to decode that:
You should see a PHP object, where you can access its properties as needed.