We have an eCommerce solution which sends XML data to suppliers.
I'm trying to setup a simple listener using PHP on a small IIS5 web server to receive these messages.
I maybe nieve but I assumed it would use an Http POST abd I could pickup the data using he $_REQUEST ARRAY. I then want to put the data into an SQL table.
The URL setup directs the XML message to a php page but nothing happens. The PHP page has the following script:
<HTML>
<BODY>
<?php
$db_host = "******";
$username = "******";
$password = "******";
$DB_name = "******";
$SQLconnection = mssql_connect($db_host, $username, $password);
mssql_select_db($DB_name, $SQLconnection);
foreach($_REQUEST as $key => $value)
{
$querystring="insert into TBL_PO_XML (XMLData) VALUES ('".$value."')";
$results=mssql_query($querystring,$SQLconnection);
}
?>
</BODY>
</HTML>
I've removed the SQL credentials for this posting.
Am I over simplifying the situation when XML is transmitted from a website to another
I've tried to search around for standard listeners for XML data and can't find any info anywhere.:(
Any ideas would be greatly appreciated.
Thanks.