I really hope someone can help me along with this one…
I need to do an xml POST to RESTful API using php, but I have absolutely no clue where to start.
I can build the xml, but how do I post the it? I cant use cURL library.
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.
You can use file_get_contents().
allow_url_fopenmust be set on php.ini.This is possible because PHP abstracts stream manipulation with his own wrappers. Setting a context to stream manipulation functions (like file_get_contents()) allows you to configure how PHP handles it.
There are more parameters than just
methodandcontent. You can set request headers, proxies, handle timeouts and everything. Please refer to the manual.