nxsCheckSSLCurl

The NextScripts: Social Networks Auto-Poster nxsCheckSSLCurl function.

Description

nxsCheckSSLCurl( $url ); 

Parameters (1)

0. $url
The url.

Usage

  1. if ( !function_exists( 'nxsCheckSSLCurl' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextscripts-social-networks-auto-poster/inc/nxs_functions_adv.php'; 
  3.  
  4. // The url. 
  5. $url = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = nxsCheckSSLCurl($url); 
  9.  

Defined (1)

The function is defined in the following location(s).

/inc/nxs_functions_adv.php  
  1. if (!function_exists("nxsCheckSSLCurl")) {function nxsCheckSSLCurl($url) { 
  2. $ch = curl_init($url); $headers = array(); $headers[] = 'Accept: text/html, application/xhtml+xml, */*'; $headers[] = 'Cache-Control: no-cache'; 
  3. $headers[] = 'Connection: Keep-Alive'; $headers[] = 'Accept-Language: en-us'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 
  4. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)");  
  5. $content = curl_exec($ch); $err = curl_errno($ch); $errmsg = curl_error($ch); if ($err!=0) return array('errNo'=>$err, 'errMsg'=>$errmsg); else return false; 
  6. }}