Example #1
0
         }
     }
     exit(W::response($xml, $data, 'news'));
     break;
 case 16:
     $res = ri91();
     $data = array(array('title' => '网络安全攻防研究室', 'cover' => $web . '/img/91ri.gif'));
     for ($i = 0; $i < count($data); $i++) {
         if ($res[$i]) {
             array_push($data, array('title' => $res[$i]['title'], 'note' => $res[$i]['description'], 'link' => $res[$i]['link']));
         }
     }
     exit(W::response($xml, $data, 'news'));
     break;
 case 17:
     $res = wooyun();
     $data = array(array('title' => 'wooyun.org 最新提交漏洞', 'cover' => $web . '/img/wooyun.png'));
     for ($i = 0; $i < count($data); $i++) {
         if ($res[$i]) {
             array_push($data, array('title' => $res[$i]['title'], 'note' => $res[$i]['description'], 'link' => $res[$i]['link']));
         }
     }
     exit(W::response($xml, $data, 'news'));
     break;
 case 18:
     $res = sec0x50();
     $data = array(array('title' => 'Web安全手册,专注Web安全', 'cover' => $web . '/img/0x50sec.png'));
     for ($i = 0; $i < count($data); $i++) {
         if ($res[$i]) {
             array_push($data, array('title' => $res[$i]['title'], 'note' => $res[$i]['description'], 'link' => $res[$i]['link']));
         }
Example #2
0
<?php

header('Content-type:text/html;charset=utf-8');
function wooyun()
{
    $data = array();
    $url = 'http://www.wooyun.org/feeds/submit';
    $result = file_get_contents($url);
    $xml = simplexml_load_string($result, 'SimpleXMLElement', LIBXML_NOCDATA);
    for ($i = 0; $i < 6; $i++) {
        $reg = '#<strong>简要描述:</strong><br/>(.+)<br/><strong>详细说明#i';
        preg_match_all($reg, $xml->channel->item[$i]->description, $matches);
        array_push($data, array('title' => $xml->channel->item[$i]->title, 'description' => '简要描述:' . $matches[1][0], 'link' => $xml->channel->item[$i]->link));
    }
    return $data;
}
print_r(wooyun());