Here is the method provide by Volusion support for ProductSync but the code in C# i want to implement in PHP but how to implement it i don't know.
https://support.volusion.com/hc/en-us/articles/209637767-API-Integration-ProductSync-Developer-
So anyone can help me that how to implement in PHP because i am working on PHP i have no knowledge of C#. I just copy this code in paste in my PHP it give me an error like this
Fatal error: Class 'XMLHTTP' not found in /home/tlztech/public_html/volusion/productSync.php on line 5.
And my code as under.
<?php
$api_url = "http://tebkq.mvlce.servertrust.com/net/WebService.aspx?Login=mylogin&EncryptedPassword=mypass&API_Name=Generic\\Products&SELECT_Columns=p.ProductCode,p.ProductID,p.ProductName,p.StockStatus";
$xml_http = new XMLHTTP();
$xml_http.open("POST", $api_url, false, "", "");
$xml_http.send(null);
$api_response = $xml_http.responseText;
$api_url = "http://tebkq.mvlce.servertrust.com/net/WebService.aspx?Login=mylogin&EncryptedPassword=mypass&Import=Update";
$api_request = "";
$api_request = $api_request + "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
$api_request = $api_request + "<xmldata>";
$api_request = $api_request + " <Products>";
$api_request = $api_request + " <ProductCode>0001</ProductCode>";
$api_request = $api_request + " <StockStatus>5</StockStatus>";
$api_request = $api_request + " </Products>";
$api_request = $api_request + "</xmldata>";
$xml_http = new XMLHTTP();
$xml_http.open("POST", $api_url, false, "", "");
$xml_http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
$xml_http.setRequestHeader("Content-Action", "Volusion_API");
$xml_http.send(api_request);
$xml_http = $xml_http.responseText;
$api_url = "http://tebkq.mvlce.servertrust.com/net/WebService.aspx?Login=mylogin&EncryptedPassword=mypass&API_Name=Generic\\Products&SELECT_Columns=p.ProductCode,p.ProductID,p.ProductName,p.StockStatus&WHERE_Column=p.ProductCode&WHERE_Value=0002";
$xml_http = new XMLHTTP();
$xml_http.open("POST", $api_url, false, "", "");
$xml_http.send(null);
$api_response = $xml_http.responseText;
?>
</div>