nxs_getVKHeaders

The NextScripts: Social Networks Auto-Poster nxs getVKHeaders function.

Description

nxs_getVKHeaders( $ref, (constant) $post = false, (constant) $aj = false ); 

Parameters (3)

0. $ref
The ref.
1. $post — Optional. (constant) => false
The post.
2. $aj — Optional. (constant) => false
The aj.

Usage

  1. if ( !function_exists( 'nxs_getVKHeaders' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextscripts-social-networks-auto-poster/inc-cl/vk.php'; 
  3.  
  4. // The ref. 
  5. $ref = null; 
  6.  
  7. // The post. 
  8. $post = false; 
  9.  
  10. // The aj. 
  11. $aj = false; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = nxs_getVKHeaders($ref, $post, $aj); 
  15.  

Defined (1)

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

/inc-cl/vk.php  
  1. if (!function_exists("nxs_getVKHeaders")) { function nxs_getVKHeaders($ref, $post=false, $aj=false) { $hdrsArr = array();  
  2. $hdrsArr['Cache-Control']='no-cache'; $hdrsArr['Connection']='keep-alive'; $hdrsArr['Referer']=$ref; 
  3. $hdrsArr['User-Agent']='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.64 Safari/537.36'; 
  4. if($post===true) $hdrsArr['Content-Type']='application/x-www-form-urlencoded';  
  5. if($aj===true) $hdrsArr['X-Requested-With']='XMLHttpRequest';  
  6. $hdrsArr['Accept']='text/html, application/xhtml+xml, */*'; $hdrsArr['DNT']='1'; 
  7. if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip, deflate'; $hdrsArr['Accept-Language']='en-US, en;q=0.8'; $hdrsArr['Accept-Charset']='ISO-8859-1, utf-8;q=0.7, *;q=0.3'; return $hdrsArr; 
  8. }}