Esempio n. 1
0
 function run()
 {
     $result = multiRequest($this->urls);
     $i = 0;
     foreach ($result as $page) {
         $dom = new DOMDocument();
         // creates new DOMdocument object
         @$dom->loadHTML($page);
         // parses html and loads it into the DOMdocument
         $metas = $dom->getElementsByTagName('meta');
         // gets all meta tags
         $this->live_pages[$i]['url'] = $this->urls[$i];
         // sets url
         $this->live_pages[$i]['title'] = get_the_first($dom->getElementsByTagName('title'));
         // gets the title
         $this->live_pages[$i]['description'] = $this->get_the_description($metas);
         // sets description
         $this->live_pages[$i]['h1'] = get_the_first($dom->getElementsByTagName('h1'));
         // gets h1
         $this->live_pages[$i]['other_h1s'] = array();
         $other_h1s = $dom->getElementsByTagName('h1');
         for ($count = 1; $count < $other_h1s->length; $count++) {
             array_push($this->live_pages[$i]['other_h1s'], htmlspecialchars($other_h1s->item($count)->textContent));
         }
         $i += 1;
     }
 }
Esempio n. 2
0
/**
 * Fetch feed data for a given facebook URL and accesstoken
 * @param {String $url} Facebook feed URL, default empty ('') {String $token} Facebook access token, default empty ('')
 * @returns {Object} Post data converted to UI consumable format
 */
function fbpimporter_getpost($url = '', $token = '')
{
    $fbpimorter_url = $url !== '' ? $url : get_option('fbpimorter_url');
    $fbpimorter_accesstoken = $token !== '' ? $token : get_option('fbpimorter_accesstoken');
    if (!$fbpimorter_url || !$fbpimorter_accesstoken) {
        error_log('Missing URL: ' . $fbpimorter_url . ' or Access token: ' . $fbpimorter_accesstoken);
        return json_encode(new stdClass());
    }
    $urlList = array($fbpimorter_url . '?access_token=' . $fbpimorter_accesstoken);
    $uiData = array();
    $resp = multiRequest($urlList);
    foreach ($resp as $key => $individualResp) {
        //error_log($individualResp);
        $parsedResp = json_decode($individualResp);
        if ($parsedResp->error) {
            error_log($parsedResp->error);
            error_log('Error url: ' . $urlList[$key]);
            error_log('Error msg: ' . $parsedResp->error->message);
            error_log('Error code: ' . $parsedResp->error->code);
            $uiData = array('error' => array('code' => $parsedResp->error->code, 'subcode' => $parsedResp->error->error_subcode));
        } else {
            if ($parsedResp->data) {
                foreach ($parsedResp->data as $entry) {
                    array_push($uiData, prepare_uidata($entry));
                }
            }
        }
    }
    return json_encode($uiData);
}
Esempio n. 3
0
 function run()
 {
     $result = multiRequest($this->urls);
     foreach ($result as $k => $page) {
         $dom = new DOMDocument();
         // creates new DOMdocument object
         @$dom->loadHTML($page);
         // parses html and loads it into the DOMdocument
         $imgs = $dom->getElementsByTagName('img');
         // gets all meta tags
         $current_url = $this->urls[$k];
         // get the url of the current page we're going to iterate through
         $matches = preg_split('/\\//', $current_url);
         $domain = $matches[0] . "//" . $matches[2];
         for ($i = 0; $i < $imgs->length; $i++) {
             // iterate through every image on the current page
             $img = $imgs->item($i);
             // since we're using dom node lists you have to use the item() function to get the img you want
             foreach ($this->imgs[$current_url] as $input) {
                 // this gets the input imgs from the input stuff
                 if (strstr($input['src'], $img->getAttribute('src'))) {
                     // if the src from the page is contained within the src from the gdoc
                     $src = trim($img->getAttribute('src'));
                     // trims the src from the image.
                     $src = preg_replace('/\\s/', '', $src);
                     // replace any spaces because there shouldn't be spaces in a src or url probably doesn't do anything
                     if (!strstr($src, '//')) {
                         // if the string doesn't contain // then it's a relative src and stuff needs to be done.
                         if (preg_match('/\\/$/', $current_url) && preg_match('/^\\//', $src)) {
                             // if the url ends in / and the src begins in /
                             $matches = preg_split('/\\//', $current_url);
                             // split the url on /'s and only add the protocol and domain
                             $src = $matches[0] . "//" . $matches[2] . $src;
                         } elseif (preg_match('/^\\//', $src)) {
                             // the the src begins with a slash but the url doesn't end in one
                             $matches = preg_split('/\\//', $current_url);
                             // split the url on /'s and add the protocol and domain
                             $src = $matches[0] . "//" . $matches[2] . $src;
                         } else {
                             $matches = preg_split('/\\//', $current_url);
                             $src = $matches[0] . "//" . $matches[2] . "/" . $src;
                             // or if neither of url doesn't have a trailing slash and the src doesn't have a preceding slash
                         }
                         // just put them together
                     } elseif (preg_match('/^\\/+/', $src)) {
                         // if the src begins with more than one / just add the protocol from the url
                         $matches = preg_split('/\\//', $current_url);
                         $src = "{$matches['0']}" . $src;
                     }
                     // the next three lines set temp pages with a index of current_url then current_src then just the string src, alt, and title
                     $temp_pages[$current_url][$src]['src'] = $img->getAttribute('src') ? $src : "none";
                     $temp_pages[$current_url][$src]['alt'] = $img->getAttribute('alt') ? $img->getAttribute('alt') : "none";
                     $temp_pages[$current_url][$src]['title'] = $img->getAttribute('title') ? $img->getAttribute('title') : "none";
                 }
             }
         }
     }
     $this->live_pages = $temp_pages;
     // after all the iterating and setting is finally done it move the temp_pages array to the live_pages array.
 }
Esempio n. 4
0
function CheckMultiProxy($proxies, $timeout, $proxy_type)
{
    $data = array();
    foreach ($proxies as $proxy) {
        $parts = explode(':', trim($proxy));
        $url = strtok(curPageURL(), '?');
        $data[] = $url . '?ip=' . $parts[0] . "&port=" . $parts[1] . "&timeout=" . $timeout . "&proxy_type=" . $proxy_type;
    }
    $results = multiRequest($data);
    $holder = array();
    foreach ($results as $result) {
        $holder[] = json_decode($result, true)["result"];
    }
    $arr = array("results" => $holder);
    echo json_encode($arr);
}
Esempio n. 5
0
function getStasticLog($module, $interface, $start_time, $offset = '', $count = 10)
{
    $ip_list = !empty($_GET['ip']) && is_array($_GET['ip']) ? $_GET['ip'] : \Statistics\Lib\Cache::$ServerIpList;
    $offset_list = !empty($_GET['offset']) && is_array($_GET['offset']) ? $_GET['offset'] : array();
    $port = \Statistics\Config::$ProviderPort;
    $request_buffer_array = array();
    foreach ($ip_list as $key => $ip) {
        $offset = isset($offset_list[$key]) ? $offset_list[$key] : 0;
        $request_buffer_array["{$ip}:{$port}"] = json_encode(array('cmd' => 'get_log', 'module' => $module, 'interface' => $interface, 'start_time' => $start_time, 'offset' => $offset, 'count' => $count));
    }
    $read_buffer_array = multiRequest($request_buffer_array);
    ksort($read_buffer_array);
    foreach ($read_buffer_array as $address => $buf) {
        list($ip, $port) = explode(':', $address);
        $body_data = json_decode(trim($buf), true);
        $log_data = isset($body_data['data']) ? $body_data['data'] : '';
        $offset = isset($body_data['offset']) ? $body_data['offset'] : 0;
        $read_buffer_array[$address] = array('offset' => $offset, 'data' => $log_data);
    }
    return $read_buffer_array;
}
Esempio n. 6
0
function multiRequestStAndModules($module, $interface, $date)
{
    \Statistics\Lib\Cache::$statisticDataCache['statistic'] = '';
    $buffer = json_encode(array('cmd' => 'get_statistic', 'module' => $module, 'interface' => $interface, 'date' => $date)) . "\n";
    $ip_list = !empty($_GET['ip']) && is_array($_GET['ip']) ? $_GET['ip'] : \Statistics\Lib\Cache::$ServerIpList;
    $reqest_buffer_array = array();
    $port = \Statistics\Config::$ProviderPort;
    foreach ($ip_list as $ip) {
        $reqest_buffer_array["{$ip}:{$port}"] = $buffer;
    }
    $read_buffer_array = multiRequest($reqest_buffer_array);
    foreach ($read_buffer_array as $address => $buf) {
        list($ip, $port) = explode(':', $address);
        $body_data = json_decode(trim($buf), true);
        $statistic_data = isset($body_data['statistic']) ? $body_data['statistic'] : '';
        $modules_data = isset($body_data['modules']) ? $body_data['modules'] : array();
        // 整理modules
        foreach ($modules_data as $mod => $interfaces) {
            if (!isset(\Statistics\Lib\Cache::$modulesDataCache[$mod])) {
                \Statistics\Lib\Cache::$modulesDataCache[$mod] = array();
            }
            foreach ($interfaces as $if) {
                \Statistics\Lib\Cache::$modulesDataCache[$mod][$if] = $if;
            }
        }
        \Statistics\Lib\Cache::$statisticDataCache['statistic'][$ip] = $statistic_data;
    }
}
Esempio n. 7
0
     } else {
         $counter = 0;
         foreach ($image_list as $img) {
             if ($img['url'] == $url) {
                 $image_list[$counter]['thumb'] = $fname;
             }
             $counter++;
         }
     }
 }
 // Loop through retrieved images and save them
 //echo '<pre>';
 //print_r($image_url_list);
 // Download new images
 set_time_limit(300);
 multiRequest($image_url_list);
 // Create thumbnails for new images
 foreach ($image_url_list as $image) {
     $url = $image;
     $fname = url_to_md5($url);
     $tmpfile = 'tmp/' . md5($url) . '.' . pathinfo($url, PATHINFO_EXTENSION);
     //$handle = fopen('http://example.com/foo.jpg', 'rb');
     set_time_limit(300);
     if (file_exists($tmpfile)) {
         //echo '<br> processing: '.$url.' file: '.$fname;
         $handle = fopen($tmpfile, 'rb');
         try {
             $img = new Imagick();
             $img->readImageFile($handle);
             if ($img->getformat() != 'gif') {
                 $img->scaleImage(300, 0);
Esempio n. 8
0
        $parsed_url = explode('/', $trimmed_url);
        $steamid = end($parsed_url);
        $data = 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' . $mybb->settings['mysteam_apikey'] . '&steamids=' . $steamid;
        $response = multiRequest($data);
        if (!strpos($response[0], 'steamid')) {
            unset($steamid);
        } else {
            $decoded = json_decode($response[0]);
            $steamname = $decoded->response->players[0]->personaname;
        }
    } elseif (strpos($mybb->input['steamprofile'], '/id/')) {
        $trimmed_url = rtrim($mybb->input['steamprofile'], '/');
        $parsed_url = explode('/', $trimmed_url);
        $vanity_url = end($parsed_url);
        $data = 'http://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/?key=' . $mybb->settings['mysteam_apikey'] . '&vanityurl=' . $vanity_url;
        $response = multiRequest($data);
        $decoded = json_decode($response[0]);
        if ($decoded->response->success == 1) {
            $steamid = $db->escape_string($decoded->response->steamid);
        }
    }
    // If we have a valid Steam ID . . .
    if ($steamid) {
        $query = $db->simple_select("users", "username", "steamid='" . $steamid . "'");
        $username_same = $db->fetch_field($query, 'username');
        // Don't run if Steam ID matches another user's current ID, and display error.
        if ($db->num_rows($query)) {
            $submit_message = '
				<p><em>' . $lang->please_correct_errors . '</em></p>
				<p>' . $lang->mysteam_submit_same . $username_same . '</p>';
        } else {
function multiRequestBatched($data, $sCookie, $batchSize)
{
    $result = array();
    $intCount = count($data);
    $numBatches = intval($intCount / $batchSize);
    //the number of whole batches we can get out of our input
    $leftover = intval($intCount % $batchSize);
    //anything leftover will be our last batch
    if ($intCount <= $batchSize) {
        //if the batch is smaller than the batchsize, just get it all
        $result = multiRequest($data, $sCookie);
        $progressMessage = "Request less than batch.  Getting " . $intCount . " records.\n";
        echo $progressMessage;
    } else {
        //slice up the array into a 2D array where the second array is the length of the batchsize
        $arrBatches = array();
        $arrBatch = array();
        $sliceIndex = 0;
        for ($i = 0; $i < $numBatches; $i++) {
            $arrBatch = array_slice($data, $sliceIndex, $batchSize);
            array_push($arrBatches, $arrBatch);
            $sliceIndex += $batchSize;
            $progressMessage = "Batch " . ($i + 1) . " of " . $numBatches . ".  " . $batchSize . " files per batch. \n";
            echo $progressMessage;
        }
        if ($leftover > 0) {
            $arrBatch = array_slice($data, $intCount - $leftover, $leftover);
            array_push($arrBatches, $arrBatch);
            $progressMessage = "Last, leftover batch of " . $leftover . " files.";
            echo $progressMessage;
        }
        $batchCounter = 1;
        foreach ($arrBatches as $theBatch) {
            echo "Downloading batch " . $batchCounter . " of " . count($arrBatches) . "(" . count($theBatch) . " in batch)\n";
            multiRequest($theBatch, $sCookie);
            $batchCounter++;
        }
    }
}
Esempio n. 10
0
function mysteam_usercp()
{
    global $lang, $mybb;
    if (!$lang->mysteam) {
        $lang->load('mysteam');
    }
    // Check if current User CP page is Steam Integration.
    if ($mybb->input['action'] == 'steamid') {
        global $db, $theme, $templates, $headerinclude, $header, $footer, $plugins, $usercpnav, $steamform;
        // Make sure user is in an allowed usergroup if set.
        $is_allowed = mysteam_filter_groups($mybb->user);
        if (!$is_allowed) {
            error_no_permission();
        }
        add_breadcrumb($lang->nav_usercp, 'usercp.php');
        add_breadcrumb($lang->mysteam_integration, 'usercp.php?action=steamid');
        $submit_display = 'display: none;';
        if (!$mybb->user['steamid']) {
            $decouple_display = 'display: none;';
        }
        // Process the form submission if something has been submitted.
        if ($mybb->input['uid']) {
            $submit_display = '';
            $uid = $db->escape_string($mybb->input['uid']);
            // If user has attempted to submit a Steam profile . . .
            if ($mybb->input['submit']) {
                // If user directly entered a Steam ID . . .
                if (is_numeric($mybb->input['steamprofile']) && strlen($mybb->input['steamprofile']) === 17) {
                    $steamid = $db->escape_string($mybb->input['steamprofile']);
                    // Ensure the Steam ID is valid.
                    $data = 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' . $mybb->settings['mysteam_apikey'] . '&steamids=' . $steamid;
                    $response = multiRequest($data);
                    if (!strpos($response[0], 'steamid')) {
                        unset($steamid);
                    } else {
                        $decoded = json_decode($response[0]);
                        $steamname = $decoded->response->players[0]->personaname;
                    }
                } elseif (!strpos($mybb->input['steamprofile'], '/')) {
                    $vanity_url = $db->escape_string($mybb->input['steamprofile']);
                    $data = 'http://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/?key=' . $mybb->settings['mysteam_apikey'] . '&vanityurl=' . $vanity_url;
                    $response = multiRequest($data);
                    $decoded = json_decode($response[0]);
                    if ($decoded->response->success == 1) {
                        $steamid = $db->escape_string($decoded->response->steamid);
                    }
                } elseif (strpos($mybb->input['steamprofile'], '/profiles/')) {
                    $trimmed_url = rtrim($mybb->input['steamprofile'], '/');
                    $parsed_url = explode('/', $trimmed_url);
                    $steamid = end($parsed_url);
                    $data = 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' . $mybb->settings['mysteam_apikey'] . '&steamids=' . $steamid;
                    $response = multiRequest($data);
                    if (!strpos($response[0], 'steamid')) {
                        unset($steamid);
                    } else {
                        $decoded = json_decode($response[0]);
                        $steamname = $decoded->response->players[0]->personaname;
                    }
                } elseif (strpos($mybb->input['steamprofile'], '/id/')) {
                    $trimmed_url = rtrim($mybb->input['steamprofile'], '/');
                    $parsed_url = explode('/', $trimmed_url);
                    $vanity_url = end($parsed_url);
                    $data = 'http://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/?key=' . $mybb->settings['mysteam_apikey'] . '&vanityurl=' . $vanity_url;
                    $response = multiRequest($data);
                    $decoded = json_decode($response[0]);
                    if ($decoded->response->success == 1) {
                        $steamid = $db->escape_string($decoded->response->steamid);
                    }
                }
                // If we have a valid Steam ID . . .
                if ($steamid) {
                    $query = $db->simple_select("users", "username", "steamid='" . $steamid . "'");
                    $username_same = $db->fetch_field($query, 'username');
                    // Don't run if Steam ID matches another user's current ID, and display error.
                    if ($db->num_rows($query)) {
                        $submit_message = '
							<p><em>' . $lang->please_correct_errors . '</em></p>
							<p>' . $lang->mysteam_submit_same . $username_same . '</p>';
                    } else {
                        $db->update_query("users", array('steamid' => $steamid), "uid='" . $uid . "'");
                        if ($vanity_url) {
                            $success_third_line = '<br />
							<strong>' . $lang->mysteam_vanityurl . '</strong>' . $vanity_url . '</p>';
                        } else {
                            $success_third_line = '<br />
							<strong>' . $lang->mysteam_name . '</strong>' . $steamname . '</p>';
                        }
                        $submit_message = '<p><strong>' . $lang->mysteam_submit_success . '</strong></p>
							<p><strong>' . $lang->mysteam_steamid . '</strong>' . $steamid . $success_third_line;
                    }
                } else {
                    $submit_message = '<p><em>' . $lang->please_correct_errors . '</em></p>
						<p>' . $lang->mysteam_submit_invalid . '</p>';
                }
            } elseif ($mybb->input['decouple']) {
                $db->update_query("users", array('steamid' => ''), "uid='" . $uid . "'");
                $submit_message = $lang->mysteam_decouple_success;
            }
        }
        eval("\$steamform = \"" . $templates->get("mysteam_usercp") . "\";");
        output_page($steamform);
    }
}
Esempio n. 11
0
     exit;
 }
 $qtd_remote = count($remote_links);
 if ($_POST[dest] != NULL && $_POST[port] != NULL && $_POST[time] != NULL) {
     $log = "Iniciando...\n";
     $log .= "Teste iniciado em " . date('d/m/Y') . " as " . date('H:i:s') . "\n";
     $log .= "Destino: " . $_POST[dest] . ":" . $_POST[port] . "\n";
     $log .= "Tempo: " . $_POST[time] . " segundos\n";
     if ($_POST[distributed] == "Y") {
         $log .= "Teste distribuido: Sim\n";
         $data = array();
         for ($x = 0; $x < $qtd_remote; $x++) {
             $data[] = $remote_links[$x] . "?p=" . $acess_url . "&r=s&dest=" . $_POST[dest] . "&port=" . $_POST[port] . "&time=" . $_POST[time] . "&id=" . $x;
             $log .= 'Remote ID ' . $x . ": " . $remote_links[$x] . "?p=" . $acess_url . "&r=s&dest=" . $_POST[dest] . "&port=" . $_POST[port] . "&time=" . $_POST[time] . "&id=" . $x . "\n";
         }
         $r = multiRequest($data);
         //var_dump($r);
         for ($x = 0; $x < $qtd_remote; $x++) {
             $log .= $r[$x] . "\n";
         }
         if ($_POST[nolocal] != "Y") {
             $log .= send_packets($_POST[dest], $_POST[port], $_POST[time], 'LOCAL');
         }
     } else {
         $log .= "Teste distribuido: Nao\n";
         $log .= send_packets($_POST[dest], $_POST[port], $_POST[time]);
     }
 } else {
     if ($_POST) {
         $log = "Erro: Preencha todos os campos!";
     } else {
Esempio n. 12
0
    }
    if (isset($actualServices[$service])) {
        $data[] = $appurl . $actualServices[$service] . '.php?query=' . $gnd . '&lang=' . $lang;
    } else {
        gnderror("service {$service} not found", $requestExample);
    }
}
/**
 * $data = array(
 * 'http://d-nb.info/gnd/118540238/about/lds',
 * 'http://hub.culturegraph.org/entityfacts/118540238',
 * 'http://de.dbpedia.org/data/Johann_Wolfgang_von_Goethe.json'
 * );
 */
// start requests
$results = multiRequest($data);
$r = array();
//array  of returned fields
//eg. $r['preferredNameForThePerson'] = ''
$fields = array('type', 'wikipage', 'img', 'homepage', 'definition', 'gndId', 'synSearch', 'description', 'gndSearchAllBooksUri', 'name', 'altname', 'academicDegree', 'since', 'until', 'professions', 'relations', 'friends', 'sameAs', 'relatedDdc');
if ($debug == "Y") {
    echo 'REQUEST: ' . filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH) . '<br><br>';
}
foreach ($fields as $f) {
    $isSetVarName = $f . 'IsSet';
    //echo $isSetVarName . '<br>';
    ${$isSetVarName} = FALSE;
}
foreach ($results as $key => $content) {
    if ($debug == "Y") {
        // echo "\$r[$key] => $content.\n";
Esempio n. 13
0
function mysteam_build_cache()
{
    global $mybb, $db, $cache;
    // Prune users who haven't visited since the cutoff time if set.
    if ($mybb->settings['mysteam_prune']) {
        $cutoff = TIME_NOW - 86400 * (int) $mybb->settings['mysteam_prune'];
        $cutoff_query = 'AND lastvisit > ' . $cutoff;
    }
    // Retrieve all members who have Steam IDs from the database.
    $query = $db->simple_select("users", "uid, username, usergroup, additionalgroups, steamid", "steamid IS NOT NULL AND steamid<>''" . $cutoff_query, array("order_by" => 'username'));
    // Check if there are usergroups to limit the results to.
    if ($mybb->settings['mysteam_limitbygroup']) {
        // Loop through results, casting aside those not in the allowed usergroups like the dry remnant of a garden flower.
        while ($user = $db->fetch_array($query)) {
            $is_allowed = mysteam_filter_groups($user);
            if ($is_allowed) {
                $users[] = $user;
            }
        }
    } else {
        while ($user = $db->fetch_array($query)) {
            $users[] = $user;
        }
    }
    // Only run if users to display
    if (!$users) {
        return false;
    }
    // Generate list of Steam IDs for contacting Steam's servers, and create array of forum user info with Steam ID as key, so that we can associate forum info with the Steam responses.
    foreach ($users as $user) {
        $steamids_array[] = $user['steamid'];
        $users_sorted[$user['steamid']] = $user;
    }
    $steamids = implode(',', $steamids_array);
    $data = 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' . $mybb->settings['mysteam_apikey'] . '&steamids=' . $steamids;
    // Fetch data from Steam's servers.
    $response = multiRequest($data);
    // Check that there was a response (i.e. ensure Steam's servers aren't down).
    if (!strpos($response[0], 'steamid')) {
        return false;
    }
    // Cache time of cache update.
    $steam_update['time'] = TIME_NOW;
    // Decode response (returned in JSON), then create array of important fields.
    $decoded = json_decode($response[0]);
    // Loop through results from Steam and associate them with the users from database query.
    foreach ($decoded->response->players as $player) {
        $steam_update['users'][$users_sorted[$player->steamid]['uid']] = array('username' => $users_sorted[$player->steamid]['username'], 'steamname' => preg_replace("/[^a-zA-Z 0-9-,!@#\$%^*()=+&_{};:'<>?]+/", "", $player->personaname), 'steamurl' => $db->escape_string($player->profileurl), 'steamavatar' => $db->escape_string($player->avatar), 'steamstatus' => $db->escape_string($player->personastate), 'steamgame' => preg_replace("/[^a-zA-Z 0-9-,!@#\$%^*()=+&_{};:'<>?]+/", "", $player->gameextrainfo));
    }
    return $steam_update;
}
Esempio n. 14
0
<link>サイトURL</link>
<description>サイト概要</description>
<author>管理人</author>
<pubDate>日付</pubDate>
<language>ja</language>
RSS;
//表示記事数
$hyojiNum = 30;
//フィード登録
$data['feedurl'][] = 'http://www.ideaxidea.com/feed';
$data['feedurl'][] = 'http://portal.nifty.com/rss/headline.rdf';
$data['feedurl'][] = 'http://feeds.feedburner.com/haishin/rss/index';
//$data['feedurl'][] = ''; 必要な分だけ追加してください
$rssList = $data['feedurl'];
//同時呼び出し
$rssdataRaw = multiRequest($rssList);
for ($n = 0; $n < count($rssdataRaw); $n++) {
    //URL設定
    $rssdata = simplexml_load_string($rssdataRaw[$n], 'SimpleXMLElement', LIBXML_NOCDATA);
    if ($rssdata->channel->item) {
        $rssdata = $rssdata->channel;
    }
    if ($rssdata->item) {
        $b_title = $rssdata->title;
        foreach ($rssdata->item as $myEntry) {
            $myDate = $myEntry->pubDate;
            if (!$myDate) {
                $myDate = $myEntry->children("http://purl.org/dc/elements/1.1/")->date;
            }
            date_default_timezone_set('Asia/Tokyo');
            $myDateGNU = strtotime($myDate);