$client = new \SoapClient
(
DOCROOT . "ex.wsdl" ,
[
'login' => $this->username,
'password' => $this->password,
'soap_version' => '1.2',
'cache_wsdl' => WSDL_CACHE_NONE,
'features' => SOAP_USE_XSI_ARRAY_TYPE,
'location' => $this->location,
'exceptions' => true,
'trace' => true
]
);
cd /etc/nginx/ssl
ll
> domain.ca-bundle domain.crt domain.csr domain.rsa
cat domain.crt domain.ca-bundle > domain.chained.crt
ll
> domain.ca-bundle domain.crt domain.csr domain.rsa domain.chained.crt
server {
listen 80 default_server;
listen 443 ssl;
root /var/www/domain/frontend/www;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name domain.com;
ssl_certificate /etc/nginx/ssl/domain.chained.crt;
ssl_certificate_key /etc/nginx/ssl/domain.rsa;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
ssl_prefer_server_ciphers on;
......
$mail = new \PHPMailer;
$mail->setFrom('email@from', 'from name');
$mail->addAddress('user@email','user name');
$mail->addReplyTo('user@email','user name');
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'my subject';
$mail->Body = " my message body";
if(!$mail->send()) {
$error[] = $mail->ErrorInfo;
}
private function getUserIp(){
if (!empty($_SERVER['HTTP_X_REAL_IP'])) //check ip from share internet
{
$ip=$_SERVER['HTTP_X_REAL_IP'];
}
elseif (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
return $ip;
}