'; $img_check_off = 'failed'; $url = "http://".$_SERVER['SERVER_NAME'].dc_blog_url; $name = dc_blog_name; $feed = "http://".$_SERVER['SERVER_NAME'].dc_blog_rss; $objPing = new basicPing($name,$url); # Définition des sites à pinger et de la fonctions à utiliser $ping_sites = array( 'Weblogues.com' => array('www.weblogues.com','/RPC/',array($objPing,'weblogPing')), 'Weblogs.com' => array('rpc.weblogs.com','/RPC2',array($objPing,'weblogPing')), 'Blo.gs' => array('ping.blo.gs','/',array($objPing,'weblogPing')), 'Technorati' => array('rpc.technorati.com','/rpc/ping',array($objPing,'weblogPing')), 'Syndic8' => array('www.syndic8.com','/xmlrpc.php',array($objPing,'weblogPing')), 'RootBlog' => array('ping.rootblog.com','/rpc.php',array($objPing,'weblogPing')) ); buffer::str( '

Ping

' ); # On ping if (!empty($_POST['ping'])) { foreach ($_POST['ping'] as $k => $v) { $ping_server = $ping_sites[$k][0]; $ping_path = $ping_sites[$k][1]; $ping_function = $ping_sites[$k][2]; $res = call_user_func($ping_function,$ping_server,$ping_path); if ($res === true) { buffer::str( '

'.$img_check_on.' '.$k.' : '. __('ping ok').'

' ); } else { buffer::str('

'.$img_check_off.' '.$k.' : '. __('ping error').' ('.$res.')

'); } } } buffer::str( '

'.__('Sites to ping').'

' ); buffer::str('
' ); foreach ($ping_sites as $k => $v) { buffer::str( '

'. '

' ); } buffer::str( '

'. '
' ); ?>