I'm trying to use API to pull a lawyer search box from Avvo.com, a legal directory. The API page is http://api.avvo.com/docs/GET/lawyers/search.html.
I'm new to API's and have no idea what to do. They give you a URL, example request, and example response, but I have no idea what to do with this.
Can someone help me? Do I need to create a php file or something?
That is pretty straight forward. Rather than doing the work for you what specific part are you having a difficult time understanding? If it is how to make the request I would recommend starting at the [cURL docs. From there going to [url=http://php.net/manual/en/function.json-decode.php]json_decode](http://php.net/manual/en/book.curl.php). Not to question your integrity but it does bring up whether it might be better suited to pay someone than do it yourself. Asking questions like "do I need to create a php file or something" raises that concern.
Yeah I felt a little dumb asking that, but I really had no idea where to start. From my research it seems as though I should start by creating a php file and defining a variable that uses "file_get_contents" to pull the data from the API URL. I'm familiar with file_get_contents.
I got that far. After that, not sure what to do. I'll look into the links you sent. Thank you. If I do hire someone, I will hire them to train me because this is something I need to learn.
file_get_content should only be used to get the contents of files on the same server. When making remote requests cURL is more appropriate considering it has a timeout where file_get_contents will run until the max execution time is reached.
Thanks for the heads up on cURL. I used that instead of file_get_contents.
This topic is now closed. New replies are no longer allowed.