Title, MMS interface in the external network state has been transferred, but the company uses the intranet, need to go Proxy server to access the external network, MMS interface is via curl post to the specified address.
$url = ' Http://122.200.77.96/sendMMS ';
$header [] = "Content-type:text/xml";
$ch = Curl_init ($url);
curl_setopt ($ch, Curlopt_url, $url);
curl_setopt ($ch, Curlopt_returntransfer, true);
curl_setopt ($ch, Curlopt_httpheader, $header);
curl_setopt ($ch, Curlopt_post, 1);
curl_setopt ($ch, Curlopt_postfields, $xmlData);
$response = curl_exec ($ch);
if (Curl_errno ($ch)) {
Print Curl_error ($ch);
}
Curl_close ($ch);
This is the post to the MMS interface code, how to go through the proxy Server curl, and then post to the specified interface
Reply to discussion (solution)
curl_setopt ($ch, Curlopt_proxy, $this->data[' PROXY ');
curl_setopt ($ch, Curlopt_httpproxytunnel, 1);
With these two, but obviously, I can't get my own local frustration.
curl_setopt ($ch, Curlopt_proxy, "Proxy server address: port");
curl_setopt ($ch, Curlopt_proxyuserpwd, "Username: password"); No, don't say that.