Changeset 809240
- Timestamp:
- 11/23/2013 10:18:49 AM (12 years ago)
- Location:
- tr-cache-and-security/trunk/inc
- Files:
-
- 2 edited
-
tr_security_class.php (modified) (2 diffs)
-
trcs_cache-options.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tr-cache-and-security/trunk/inc/tr_security_class.php
r808562 r809240 34 34 $u = @base64_encode($u); 35 35 $for = str_replace(array('http://','https://'),'',get_bloginfo('url')); 36 $body = array(); 36 37 $body['tr_action'] = 'get_lock_ip_remote'; 37 38 $body['ip'] = $ip; … … 41 42 $body['u'] = $u; 42 43 $body['s'] = $s; 43 $rs = wp_remote_post(TRSCSC_SERVER, array('body' => $body, 44 'timeout' => 3)); 45 44 $rs = wp_remote_get(TRSCSC_SERVER.'?'.http_build_query($body), array('timeout' => 3)); 45 46 46 $return = false; 47 47 if (!is_wp_error($rs)) { -
tr-cache-and-security/trunk/inc/trcs_cache-options.php
r808562 r809240 136 136 137 137 /// 138 139 if( !isset($_SESSION['tr_security']) || @$_SESSION['tr_security']<time()-86400)138 $logged = isset($_SESSION['tr_security']) && @$_SESSION['tr_security']>time()-86400; 139 if($logged && get_option('_tr_sc_logged_server')) 140 140 { 141 141 $body = array(); … … 143 143 $body['getdata'] = 'cache-security'; 144 144 $body['for'] = urlencode($for); 145 $data = @wp_remote_ post(TRSCSC_SERVER,array('body'=>$body));145 $data = @wp_remote_get(TRSCSC_SERVER.'?'.http_build_query($body),array('timeout' => 3)); 146 146 $data = @json_decode($data,true); 147 if(is_array($data) )147 if(is_array($data) && $data['ok']) 148 148 { 149 149 $fname = @$data['tr_security']; 150 update_option('_tr_sc_logged_server',true); 150 151 } 151 152 }
Note: See TracChangeset
for help on using the changeset viewer.