Source: https://wiki.cdot.senecacollege.ca/wiki/OPS335_Lab_1
Generate key:
$ ssh-keygen
You will have id_rsa.pub and id_rsa
Send id_rsa.pub to server admin or paste into server you need to ssh.
$ ssh-keygen
$myParams = array('intA' => 1, 'intB' => 2);
$client = new SoapClient("http://www.dneonline.com/calculator.asmx?WSDL");
$result = $client->Add($myParams);
var_dump($result);
SoapClient {
/* Methods */
public mixed __call ( string $function_name , string $arguments )
public SoapClient ( mixed $wsdl [, array $options ] )
public string __doRequest ( string $request , string $location , string $action , int $version [, int $one_way = 0 ] )
public array __getFunctions ( void )
public string __getLastRequest ( void )
public string __getLastRequestHeaders ( void )
public string __getLastResponse ( void )
public string __getLastResponseHeaders ( void )
public array __getTypes ( void )
public void __setCookie ( string $name [, string $value ] )
public string __setLocation ([ string $new_location ] )
public bool __setSoapHeaders ([ mixed $soapheaders ] )
public mixed __soapCall ( string $function_name , array $arguments [, array $options [, mixed $input_headers [, array &$output_headers ]]] )
public SoapClient ( mixed $wsdl [, array $options ] )
}
masoffer_order_info = {
transaction_id: '',
offer_id: '',
transaction_time: , // 1447388224436
signature: '',
/*transaction_discount: 100000, */
traffic_id: Cookies.get('mp_traffic_id'),
products: [
$value)
{
$i++;
//if ($key == 'totalSanPham') continue;
$product3 = $value;
?>
{
id: '',
sku: '',
url: 'http://myphamchonam.com',
price: ,
name: '',
category: '',
category_id : ,
status_code: 0,
quantity:
}
]
};
}
var MasOffer = {
transaction: function (x) {
var y = JSON.stringify(MasOffer.parseTransaction(x));
var url = 'https://static.masoffer.net/img/oid/' + x.offer_id + '/?data=' + encodeURIComponent(y);
var oImg = document.createElement("img");
oImg.setAttribute('src', url);
oImg.style.width = '1px';
oImg.style.height = '1px';
oImg.style.position = 'fixed';
oImg.style.top = '0';
document.body.appendChild(oImg);
},
parseTransaction: function (z) {
var products = z.products;
products.forEach(function(product, index){
try {
products[index] = MasOffer.parseProduct(product);
}
catch(err) {
console.log(err.message);
}
});
return z;
},
parseProduct: function (p) {
if (p.category_id !== undefined) {
p.category_id_raw = p.category_id;
p.category_id = 1;
}
return p;
}
};
var interval;
interval = setInterval(function(){
if (typeof masoffer_order_info !== "undefined") {
clearInterval(window.interval);
MasOffer.transaction(masoffer_order_info)
}
}, 2000);