<?
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)
here is powershell script on how to get list of files from changesets associated with one tfs task
$dllPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\...

-
Error:The element 'Schedule' has invalid child element 'RecurrenceRule'. List of possible elements expected: 'Occurring...
-
$z = Import-Csv zerotrac.csv $nums = Import-Csv allleetcode.csv $md =@{} #converting one csv into hashmap for quicker search foreac...
-
Here is instruction how to make blinking text in rainmeter: 1.right click and select " Edit skin " 2.add following code to temp...
No comments:
Post a Comment