I’m working with an external API webservice that returns a json output true or false. I visit a URL like
http://site.com/api/valid
and it gives me something like this, which looks like json
"true"
Right now I’m visiting the url manually, but I want to now do it programmatically from within my zend project. What should I use to get the result correctly
there are a lot of ways. The simplest is to use
file_get_contents().If it is a popular webservice . there might be a library written for it already. This is preferred since it will handle error conditions and corner cases. Google around for it first.