Bing found the following results
- Viewed 5k times2answered Apr 22, 2012 at 16:01
You can use file_get_contents(). allow_url_fopen must be set on php.ini.
$context = stream_context_create(array('http'=>array('method' => 'POST''content' => $myXMLBody)));$returnData = file_get_contents('http://example.com/restfulapi', false, $context);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 method and content. You can set request headers, proxies, h...
Content Under CC-BY-SA license posting xml to a rest api with php - Stack Overflow
You can use file_get_contents (). allow_url_fopen must be set on php.ini. $context = stream_context_create(array('http'=>array(. 'method' => 'POST'. 'content' => $myXMLBody. ))); $returnData = file_get_contents('http://example.com/restfulapi', false, $context); This is possible because PHP abstracts stream manipulation with his own wrappers.Explore further
How to Consume XML Rest API Using PHP - Phpflow.com
- People also ask
PHP: How to send REST requests with XML data - Stack Overflow
PHP RESTful Web Service API – Part 1 - Phppot
Utilizing XML in RESTful API: A Comprehensive Guide
PHP SimpleXML Parser - W3Schools
How to Build a Simple REST API in PHP | Envato Tuts+
PHP: Basic SimpleXML usage - Manual
Simple REST API With PHP MySQL (Step-by-Step Example) - Code …
PHP: xml_parse - Manual
- Some results have been removed