request( $url , array( 'method'=>$method, 'body'=>$body, 'headers'=>$headers, 'user-agent'=>'LetsFX http://www.letsfx.com' ) );
// Success?
if ( !is_wp_error($result) && isset($result['body']) ) {
return $result['body'];
// Failure (server problem...)
} else {
return false;
}
}
function EagleEye_Analyst_DailyReports() {
$dow=date(w);
if($dow==0||$dow==6)return;
if(!get_option('EagleEye_Analyst_last_DR')) add_option('Letsfx_last_DR', '');
$dt=date('o.m.d');
$LastDR = get_option('EagleEye_Analyst_last_DR');
if($dt==$LastDR) return;
//set_time_limit(0);
$active = get_option('EagleEye_Analyst_active');
if(!$active) return;
$cat = get_option('EagleEye_Analyst_cat');
$eurusd = iif(get_option('EagleEye_Analyst_eurusd'),'EURUSD','');
$gbpusd = iif(get_option('EagleEye_Analyst_gbpusd'),'GBPUSD','');
$usdchf = iif(get_option('EagleEye_Analyst_usdchf'),'USDCHF','');
$usdjpy = iif(get_option('EagleEye_Analyst_usdjpy'),'USDJPY','');
$english = iif(get_option('EagleEye_Analyst_english'),'en','');
$arabic = iif(get_option('EagleEye_Analyst_arabic'),'ar','');
$instr_a = array($eurusd, $gbpusd, $usdchf, $usdjpy) ;
$lang_a = array($english, $arabic) ;
foreach($lang_a as $lang){
if(strlen($lang)<2) continue;
foreach($instr_a as $instr){
if(strlen($instr)<2) continue;
$body='';
$excerp = my_fetch_url1('http://reports.4xeagleeye.com/?target=html&domain=letsfx.com&display=excerp&pair='.$instr.'&lang='.$lang.'&day='.date("o.m.d"));
if($excerp==false) continue;
$excerp = str_replace(array('\r\n','\r','\n','','
','
','
'), array('','','','','','',''),$excerp);
$body = '
', ']]>', $content);
$content = strip_tags($content);
$excerpt_length = 20;
$words = explode(' ', $content, $excerpt_length + 1);
if(count($words) > $excerpt_length) :
array_pop($words);
array_push($words, '…');
$content = implode(' ', $words);
endif;
$content = '' . $content . '
'; //endif; // Make sure to return the content return 'fff'.$content; } add_filter('bp_create_excerpt', 'my_excerpts'); function my_bp_blogs_record_activity_content( $bp_excerpt, $content ) { return the_excerpt(); } add_filter( 'bp_blogs_record_activity_content', 'my_bp_blogs_record_activity_content', 1, 2 ); function my_bp_post_excerpt($activity_content, $post, $permalink) { //return the_excerpt(); if($post->post_excerpt) return $post->post_excerpt; else return $activity_content; } add_filter( 'bp_get_activity_content_body', 'my_bp_post_excerpt', 1, 3 ); */ ?>