I use cURL on this asmx URL: http://ltcmobile.webhop.biz:2016/ereloadws/service.asmx success in localhost, but when I upload the file to my live server, it will return bool(false)
However I tried changing the submission URL and my request to other asmx URL, I tried http://www.webservicex.net/globalweather.asmx and it does work on localhost and live server.
Does this mean my connection was blocked by http://ltcmobile.webhop.biz:2016/ereloadws/service.asmx? Anyway I can check and confirm this?
curl_getinfo result:
localhost: Array ( [url] => http://ltcmobile.webhop.biz:2016/ereloadws/service.asmx [content_type] => text/xml; charset=utf-8 [http_code] => 200 [header_size] => 230 [request_size] => 525 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.109 [namelookup_time] => 0 [connect_time] => 0.063 [pretransfer_time] => 0.063 [size_upload] => 393 [size_download] => 479 [speed_download] => 4394 [speed_upload] => 3605 [download_content_length] => 479 [upload_content_length] => 393 [starttransfer_time] => 0.109 [redirect_time] => 0 [redirect_url] => [primary_ip] => 175.139.27.203 [certinfo] => Array ( ) [primary_port] => 2016 [local_ip] => 192.168.1.102 [local_port] => 52286 )
live server: Array ( [url] => http://ltcmobile.webhop.biz:2016/ereloadws/service.asmx [content_type] => [http_code] => 0 [header_size] => 0 [request_size] => 0 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0 [namelookup_time] => 9.7E-5 [connect_time] => 0 [pretransfer_time] => 0 [size_upload] => 0 [size_download] => 0 [speed_download] => 0 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => -1 [starttransfer_time] => 0 [redirect_time] => 0 [redirect_url] => [primary_ip] => 175.139.27.203 [certinfo] => Array ( ) )
curl call:
$xml_data = '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SendRequest xmlns="http://tempuri.org/">
<ResellerAccount>*******</ResellerAccount>
<RefNum>******</RefNum>
</SendRequest>
</soap:Body>
</soap:Envelope>';
$URL = "http://ltcmobile.webhop.biz:2016/ereloadws/service.asmx";
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml; charset=utf-8'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
var_dump($output);
Thanks in advance!
175.139.27.203
? so much to do, so little time. :) – YvesLeBorg