<?
function web_service($serv,$plain_data){
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "https://myserver.com/myService.asmx/".$serv);
curl_setopt($curl_handle, CURLOPT_HEADER, 1);
curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl_handle, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $plain_data);
$response = curl_exec ($curl_handle) or die ( "There has been an error connecting");
#echo $response;
curl_close ($curl_handle);
$response= strstr($response, '<?xml version="1.0" encoding="utf-8"?>');
$re = str_replace('>','>',str_replace('<','<',$response));
$re1= str_replace('<string xmlns="http://tempuri.org/">',"<string>",$re);
return $re1;
}
function web_method($f,$u){
$data="Subscriber=".$f['studid']."&Affiliate=".$u['referral']
$re1= msi_service("MyMethodName1",$data);
$xml = simplexml_load_string($re1);
$result = $xml->xpath("/string"); // <- parsing result
foreach($result as $result_code) {
return $result_code;
}
return $re1;
}
?>
Friday
php function for dot.net webservice submission
Subscribe to:
Post Comments (Atom)
test smtp server with powershell
Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...
-
Here is instruction how to make blinking text in rainmeter: 1.right click and select " Edit skin " 2.add following code to temp...
-
Error:The element 'Schedule' has invalid child element 'RecurrenceRule'. List of possible elements expected: 'Occurring...
-
If you use Visual Studio to open a Web project that was developed for the .NET Framework 2.0, the .NET Framework 3.0, or the .NET Framework...
No comments:
Post a Comment