'. t("Displays GRNET's peers") .'

'; break; } return $output; } // function getgrnetpeers_help function getgrnetpeers_perm() { return array('access getgrnetpeers content'); } // function getgrnetpeers_perm() function getgrnetpeers_block($op = 'list', $delta = 0, $edit = array()) { if ($op == "list") { // Generate listing of blocks from this module, for the admin/block page $block = array(); $block[0]["info"] = t('GRNET Peers'); return $block; } else if ($op == 'view') { // Generate our block content // content variable that will be returned for display $block_content = ''; $request = xmlrpc_encode_request("sget","lala"); $header ="Content-Type: text/xml" ; $context = stream_context_create(array('http' => array( 'method' => "POST", 'header' => $header, 'content' => $request ))); // example of Web Service URI $webservice="https://members.grnet.gr/peers/"; //$webservice=$ws_uri; // $file = file_get_contents($webservice, false, $context); $file = file_get_contents($webservice); // $block_content = xmlrpc_decode($file); $block_content = $file; // check to see if there was any content before returning // the block view if ($block_content == '') { // no content from a week ago $block['subject'] = 'GRNET Peers'; $block['content'] = 'Sorry No Content'; return $block; } // set up the block $block['subject'] = 'GRNET Peers'; $block['content'] = $block_content; return $block; } } // end onthisdate_block