| Server IP : 45.40.142.9 / Your IP : 216.73.216.236 Web Server : Apache System : Linux s45-40-142-9.secureserver.net 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : bayspec ( 506) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/cpanel-php73-SOAP-0.14.0/example/ |
Upload File : |
<?php
/**
* @category Web Services
* @package SOAP
*/
require_once("SOAP/Client.php");
require_once("SOAP/test/test.utility.php");
require_once("SOAP/Value.php");
$filename = 'attachment.php';
$v = new SOAP_Attachment('test','text/plain',$filename);
$methodValue = new SOAP_Value('testattach', 'Struct', array($v));
$client = new SOAP_Client('mailto:user@domain.com');
# calling with mime
$resp = $client->call('echoMimeAttachment',array($v),
array('attachments'=>'Mime',
'namespace'=>'http://soapinterop.org/',
'from'=>'user@domain.com',
'host'=>'smtp.domain.com'));
print $client->wire."\n\n\n";
print_r($resp);
# calling with DIME
$resp = $client->call('echoMimeAttachment',array($v));
# DIME has null spaces, change them so we can see the wire
$wire = str_replace("\0",'*',$client->wire);
print $wire."\n\n\n";
print_r($resp);
?>