Which is the best method to get response from a web service URL? for example, we can use cURL, file_get_contents, file, .. to get response. Can anybody help me to find a best one?
valsaraj 0 Newbie Poster
Recommended Answers
Jump to PostDepends on your needs. If you only need GET parameters then file_get_contents should be fine. cURL on the other hand allows for much more customization in headers sent.
Jump to PostAre there parameters and if so do they need passed via GET or POST requests?
cURL will allow for GET and POST requests, but file_get_contents will only be able to open urls that can accept GET requests.
Since you're parsing XML and 90% of the web services I …
All 5 Replies
ShawnCplus 456 Code Monkey Team Colleague
valsaraj 0 Newbie Poster
mschroeder 251 Bestower of Knowledge Team Colleague
valsaraj 0 Newbie Poster
mschroeder 251 Bestower of Knowledge Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.