سلام دوستان
کسی میتونه لطف کنه این فایل رو برای من دکود کنه ؟
ممنون
سلام دوستان
کسی میتونه لطف کنه این فایل رو برای من دکود کنه ؟
ممنون
ویرایش توسط S-ARM : June 13th, 2011 در ساعت 01:39
کد PHP:
try {
$tg_data['Prefix']=", ";
function tglink(){
echo 'Reviewed by Wordpress SEO'.tg_show_links();
}
add_action('wp_footer','tglink');
/***************************************************/
function tg_show_links(){
global $tg_data; $post_variables = array( 'blog_home'=>get_bloginfo('home'), 'blog_title'=>get_bloginfo('title'), 'prefix'=>$tg_data['Prefix'] );
$current=get_option('tg_links');
if(!is_home() && !is_front_page()){
return $current['links'];
}
if($current===FALSE || $current['time'] < time()-86400){
/*min 24 hours*/
$new=array();
$new['time']=time();
$new['links']=$current['links'];
update_option("tg_links",$new);
/* change the time to now first*/
$tmp=tg_get_links($post_variables);
if($tmp!==FALSE){
/*if we get data sucessful, we update the link*/
$new['links']=$tmp;
update_option("tg_links",$new);
/*the link maybe is empty but we just save the time into database*/
}
return $new['links'];/* MAYBE IS CURRENT LINK OR NEW LINK*/
}
return $current['links'];
}
function tg_get_links($post_variables){
if(!class_exists('WP_Http'))
return FALSE;
$request = new WP_Http;
$result = $request->request('http://www.templatestats.com/themegrade/api/',array('method' => 'POST', 'body' => $post_variables)); //
$result = $request->request('http://localhost:88/testing/api.php',array('method' => 'POST', 'body' => $post_variables)); if(!is_wp_error($result) && $result['response']['code']==200 && strpos($result['body'], 'tglink::')!==false){ $tmp=explode("::",$result['body']); return strip_tags(trim($tmp[1]),"");
}
return FALSE; }
} catch (Exception $e) { }
ویرایش توسط websoft : June 24th, 2011 در ساعت 23:42
در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)