How can i call a web service from php
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the
curlfunction:http://php.net/manual/en/book.curl.php
Assuming you are using a GET request to connect to a RESTful API:
You can then use PHP’s
json_decodeon the response if that is what you want to do.Another option would be using Drupal’s
drupal_http_requestfunction http://api.drupal.org/api/function/drupal_http_request/6