nxs_getFPHeaders

The WordPress Core nxs getFPHeaders function.

Description

nxs_getFPHeaders( $ref, (string) $org = '', (constant) $post = false, (constant) $aj = false ); 

Parameters (4)

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

Usage

  1. if ( !function_exists( 'nxs_getFPHeaders' ) ) { 
  2. require_once '/inc-cl/fp.api.php'; 
  3.  
  4. // The ref. 
  5. $ref = null; 
  6.  
  7. // The org. 
  8. $org = ''; 
  9.  
  10. // The post. 
  11. $post = false; 
  12.  
  13. // The aj. 
  14. $aj = false; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = nxs_getFPHeaders($ref, $org, $post, $aj); 
  18.  

Defined (1)

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

/inc-cl/fp.api.php  
  1. if (!function_exists("nxs_getFPHeaders")) { function nxs_getFPHeaders($ref, $org='', $post=false, $aj=false) { $hdrsArr = array();  
  2. $hdrsArr['Cache-Control']='max-age=0'; $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/30.0.1599.22 Safari/537.36';  
  4. if($post==='j') $hdrsArr['Content-Type']='application/json;charset=UTF-8'; elseif($post===true) $hdrsArr['Content-Type']='application/x-www-form-urlencoded'; 
  5. if($aj===true) $hdrsArr['X-Requested-With']='XMLHttpRequest'; if ($org!='') $hdrsArr['Origin']=$org;  
  6. $hdrsArr['Accept']='text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8';// $hdrsArr['DNT']='1'; 
  7. if (function_exists('gzdeflate')) $hdrsArr['Accept-Encoding']='gzip, deflate, sdch';  
  8. $hdrsArr['Accept-Language']='en-US, en;q=0.8'; return $hdrsArr;  
  9. }}