当前位置: 首页>>代码示例>>PHP>>正文


PHP get_html函数代码示例

本文整理汇总了PHP中get_html函数的典型用法代码示例。如果您正苦于以下问题:PHP get_html函数的具体用法?PHP get_html怎么用?PHP get_html使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_html函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_members

function get_members($url)
{
    $html = get_html($url);
    if ($html === false) {
        echo 'connection error';
    } else {
        $oldSetting = libxml_use_internal_errors(true);
        libxml_clear_errors();
        $dom = new DOMDocument();
        $dom->loadHtml($html);
        $tbody = $dom->getElementsByTagName('tbody');
        $trs = $tbody[0]->getElementsByTagName('tr');
        global $parteinameFilter;
        $members = array();
        foreach ($trs as $tr) {
            $tds = $tr->getElementsByTagName('td');
            $link = $tds[0]->getElementsByTagName('a');
            $member = array('name' => $link[0]->nodeValue, 'link' => $link[0]->getAttribute('href'), 'partei' => str_replace($parteinameFilter, '', $tds[1]->nodeValue));
            $aze = str_replace(' ', '', htmlentities($tds[2]->nodeValue));
            if ($aze) {
                $member['amtszeitende'] = $aze;
            }
            $members[] = $member;
        }
        libxml_clear_errors();
        libxml_use_internal_errors($oldSetting);
        return $members;
    }
    return false;
}
开发者ID:RobTranquillo,项目名称:RISST,代码行数:30,代码来源:structure_members.php

示例2: get_commitees

function get_commitees($url)
{
    $html = get_html($url);
    if ($html === false) {
        echo 'connection error';
    } else {
        $oldSetting = libxml_use_internal_errors(true);
        libxml_clear_errors();
        $dom = new DOMDocument();
        $dom->loadHtml($html);
        $tbody = $dom->getElementsByTagName('tbody');
        $trs = $tbody[0]->getElementsByTagName('tr');
        $commitees = array();
        foreach ($trs as $tr) {
            $tds = $tr->getElementsByTagName('td');
            $link = $tds[0]->getElementsByTagName('a');
            if ($link->length > 0) {
                $commitee = array('name' => $link[0]->nodeValue, 'link' => $link[0]->getAttribute('href'));
            }
            $commitees[] = $commitee;
        }
        libxml_clear_errors();
        libxml_use_internal_errors($oldSetting);
        return $commitees;
    }
    return false;
}
开发者ID:RobTranquillo,项目名称:RISST,代码行数:27,代码来源:structure_commitees.php

示例3: fetch_data_from_html

function fetch_data_from_html($remote_page)
{
    // Returns an array of products and ratings
    $product_rating_arr = array();
    $html = get_html($remote_page);
    $dom = new domDocument();
    $dom->loadHTML($html);
    $dom->preserveWhiteSpace = false;
    $tables = $dom->getElementsByTagName('table');
    $table = $tables->item(0);
    $rows = $table->getElementsByTagName('tr');
    $i = 0;
    foreach ($rows as $row) {
        if ($i != 0) {
            $columns = $row->getElementsByTagName('td');
            $product = $columns->item(0)->textContent;
            $rating = $columns->item(1)->textContent;
            $image = $columns->item(2)->textContent;
            $var = $product . "__" . $image;
            $product_rating_arr[$var] = $rating;
        }
        $i += 1;
    }
    return $product_rating_arr;
}
开发者ID:sanjeedha,项目名称:Enterprise-Marketplace,代码行数:25,代码来源:TopratedProducts.php

示例4: parse_event_html

function parse_event_html($schedule_html, $event_url)
{
    $page_type = get_page_type($schedule_html);
    if ($page_type == WORLD_CURL) {
        $event = get_basic_event_information_wct($schedule_html, $event_url);
        $event->games = get_event_games_wct($event_url, $event);
        return $event;
    } else {
        if ($page_type == CCA) {
            $event = get_basic_event_information_cca($schedule_html, $event_url);
            $event->games = get_event_games_cca(get_html($event_url));
            return $event;
        }
    }
}
开发者ID:brthiess,项目名称:rockstat_final,代码行数:15,代码来源:web-crawler.php

示例5: display_gallery_pagination

function display_gallery_pagination($url = "", $totalresults = 0, $pageno = 1, $resultspp = 15, $display = true)
{
    //lookup total number of rows for query
    $configp['results_per_page'] = $resultspp;
    $configp['total_no_results'] = $totalresults;
    $configp['page_url'] = $url;
    $configp['current_page_segment'] = 4;
    $configp['url'] = $url;
    $configp['pageno'] = $pageno;
    $output = get_html($configp);
    if ($display == true) {
        echo $output;
    } else {
        return $output;
    }
}
开发者ID:alvarobfdev,项目名称:applog,代码行数:16,代码来源:functions.php

示例6: get_conversation

/**
 * function get_conversation()
 * This function gets the conversation format
 * @param  array $convoArr - the conversation array
 * @return array $convoArr
**/
function get_conversation($convoArr)
{
    $conversation = get_conversation_to_display($convoArr);
    runDebug(__FILE__, __FUNCTION__, __LINE__, "Processing conversation as " . $convoArr['conversation']['format'], 4);
    switch ($convoArr['conversation']['format']) {
        case "html":
            $convoArr = get_html($convoArr, $conversation);
            break;
        case "json":
            $convoArr = get_json($convoArr, $conversation);
            break;
        case "xml":
            $convoArr = get_xml($convoArr, $conversation);
            break;
    }
    return $convoArr;
}
开发者ID:massyao,项目名称:chatbot,代码行数:23,代码来源:display_conversation.php

示例7: get_event_games_wct

function get_event_games_wct($event_url, $event)
{
    $game_objects = array();
    $scores_url = $event_url . '&view=Scores&showdrawid=1';
    $scores_html = get_html($scores_url);
    $number_of_draws = get_number_of_draws_wct($scores_html->find(".linescoredrawlink"));
    for ($draw_id = 1; $draw_id <= $number_of_draws; $draw_id++) {
        $draw_url = $event_url . '&view=Scores&showdrawid=' . $draw_id;
        $html = get_html($draw_url);
        $page_type = get_page_type_wct($html);
        if ($page_type == WCT_EVENT_PAGE) {
            $game_objects = array_merge($game_objects, parse_wct_event_page($html, $event));
        } else {
            if ($page_type == ERROR) {
                echo "\n*****ERROR: Can't Determine Page Type****";
            }
            pause("");
        }
    }
    return $game_objects;
}
开发者ID:brthiess,项目名称:rockstat_final,代码行数:21,代码来源:parse_wct.php

示例8: Get_Channel_EPG

/**
 * Функция выводит EPG с заданным каналом
 *
 * @param string $parsedChannel
 */
function Get_Channel_EPG($parsed_Channel_ID, $parsed_Announce_ID)
{
    global $content_dir;
    $path = "{$content_dir}/kulichki.net.{$parsed_Channel_ID}.html";
    if (!is_aktuell($path)) {
        get_html($parsed_Channel_ID, $path);
    }
    //get announce html
    $path_announce = "{$content_dir}/kulichki.net.{$parsed_Announce_ID}.announce.html";
    if (!is_aktuell($path_announce)) {
        get_html($parsed_Announce_ID, $path_announce);
    }
    parse_channel($path, $path_announce);
}
开发者ID:pombredanne,项目名称:epg_updater,代码行数:19,代码来源:index.php

示例9: if

<ul class="form">
<?
	// ========= CARGO =========
	get_html("charge");

	// ========= APELLIDO Y NOMBRE =========
	get_html("titular_lastfirstname");

	// ========= TELEFONO FIJO Y CELULAR =========
	get_html("titular_phones");

	// ========= TIPO Y NUMERO DE DOCUMENTO =========
	get_html("titular_document");

	// ========= CATCHA =========
	if( isset($_GET["show_catcha"]) ){	
		get_html("catcha");
	}
?>
</ul>

<div class="buttonRegister">
<? if( isset($_GET["coduser"]) ){?>
	<input type="button" value="Guardar" onclick="Registry.send('registry_club.php', 'edit', '<? echo $_GET["coduser"];?>');">
	<input type="reset" value="Reset">

<? }else{?>
	<input type="button" value="Registrarme" onclick="Registry.send('registry_club.php', 'new');">
<? }?>
</div>
开发者ID:jsuarez,项目名称:Lexer,代码行数:30,代码来源:club.php

示例10: judge_auth

<?php

#req: http://www.380747.com/PolicyManage/GJPolicyList.aspx?Action=GetList&Page=1&callback=jQuery11110604594005504623_1437061376820&Platform=&Carrier=&PolicyID=&Flag=&DepName=&ArrName=&DepArea=&ArrArea=&DepCity=&ArrCity=&ProName=&Provider=&Share=&Office=&Auditing=&Record=&Asc=0&AscName=Updatetime&TicketFrom=&TicketTo=&GoFrom=&GoTo=&TicketType=&_=1437061376821
#rsp: PolicyManage/GJPolicyList_json.html
include 'InitPolicyList.php';
include 'Public.php';
judge_auth();
$arr_req = get_req();
#printf("REQUEST_METHOD: ".$_SERVER['REQUEST_METHOD']."\n");
#print_r($_GET);
#error_log("$g_today query now_running error. ".$arr_req["Action"]."\n",3,'/tmp/errors.log');
if ($arr_req["Action"] == null) {
    if ($arr_req["Page"] != null) {
        print get_html($arr_req["Page"]);
    } else {
        print get_html(1);
    }
} else {
    if ($arr_req["Action"] == "Auditing") {
        if ($arr_req["ID"] == null || $arr_req["ID"] == "" || $arr_req["Type"] == null || $arr_req["Type"] == "") {
            echo "NO";
            exit;
        }
        $arr_id = split('[,]', $arr_req["ID"]);
        $ids = "";
        for ($j = 0; $j < count($arr_id); $j++) {
            if ($ids != "") {
                $ids .= ",";
            }
            $ids .= "\"" . $arr_id[$j] . "\"";
        }
开发者ID:xiaozhang535,项目名称:sola,代码行数:31,代码来源:GJPolicyList.php

示例11: echo_bootstrap

<?php

include_once '../includes/main.php';
echo_bootstrap(get_html(), array('css' => 'portfolio'));
function get_html()
{
    return <<<HTML
\t\t<div id="nav-menu"></div>
HTML;
}
开发者ID:ryanostrom,项目名称:ryandevelops,代码行数:10,代码来源:index.php

示例12: echo_bootstrap

<?php

include_once 'includes/main.php';
include_once 'includes/Client.php';
echo_bootstrap(get_html(), array('js' => 'add_client'));
function get_html()
{
    $client_inputs = array(array('id' => 'client_name', 'placeholder' => 'Client Name'), array('id' => 'alias', 'placeholder' => 'Client Acronym'));
    $html = <<<HTML
    <div id="add-client">
    <h2>Add Client</h2>
    <h3>Client Details</h3>
HTML;
    foreach ($client_inputs as $key => $input) {
        $autofocus = $key == 0 ? true : false;
        $html .= Client::createInput($input['id'], $input['placeholder'], array('autofocus' => $autofocus));
    }
    $html .= <<<HTML
  \t<h3>Project Details</h3>
HTML;
    $html .= Client::getProjectInput('1');
    $html .= <<<HTML
      <button class="add"><i class="fa fa-plus-circle"></i>Project</button>
      <button id="create" class="primary">Create</button>
    </div>
HTML;
    return $html;
}
开发者ID:ryanostrom,项目名称:clients,代码行数:28,代码来源:add_client.php

示例13: get_event_format_wct

function get_event_format_wct($event_url)
{
    $event_html = get_html($event_url);
    $event_info_html = $event_html->find(".wctlight");
    $number_of_qualifiers = preg_replace("/[^0-9]/", "", substr($event_info_html[7]->plaintext, stripos($event_info_html[7]->plaintext, "(")));
    $event_type = $event_info_html[9]->plaintext;
    //echo "Number of qualifiers: " . $number_of_qualifiers;
    //echo "Event Type: " . $event_type;
    return new Format($event_type, $number_of_qualifiers);
}
开发者ID:brthiess,项目名称:rockstat_final,代码行数:10,代码来源:wct_event.php

示例14: filemtime

require 'config.php';
require 'function.php';
$fromurl = 'http://bt.doc5188.com';
$indexhtml = 'index.cache.html';
if (file_exists($indexhtml)) {
    $filetime = filemtime($indexhtml);
    $nowtime = time();
    if ($nowtime - $filetime > $config['cachetime']) {
        $content = get_html($fromurl, $config);
        echo $content;
        write_html($content, $indexhtml);
    } else {
        $content = file_get_contents($indexhtml);
        exit($content);
    }
} else {
    $content = get_html($fromurl, $config);
    echo $content;
    write_html($content, $indexhtml);
}
function get_html($siteurl, $config)
{
    $str = get_url_contents($siteurl);
    $str = str_replace('http://bt.doc5188.com', $config['siteurl'], $str);
    $str = str_replace('优搜磁力搜索', $config['title'], $str);
    $str = str_replace('/statics/', $config['erji'] . 'statics/', $str);
    $str = preg_replace('/<title>([\\s\\S]*?)<\\/title>/i', '<title>' . $config['title'] . ' - 做最全的资源搜索引擎 - 没有搜不到,只有想不到!</title>', $str);
    $str = preg_replace('/<div style="display:none;">([\\s\\S]*?)<\\/div>/i', '<div class="foot">友情链接:' . $config['link'] . '</div><div style="display:none;">' . $config['tongji'] . '</div>', $str);
    $str = str_replace('action="/search"', 'action="' . $config['erji'] . 'search.php"', $str);
    return $str;
}
开发者ID:istrwei,项目名称:ybs_xiaotou,代码行数:31,代码来源:index.php

示例15: download_playlist

 function download_playlist($tracks)
 {
     foreach ($tracks as $id) {
         if (!is_integer($id)) {
             continue;
         }
         $data = get_html('http://youtube.com/watch?v=' . $id);
         if ($data != '') {
             $this->download_track($data);
         }
     }
 }
开发者ID:uwiuw,项目名称:myphpclass,代码行数:12,代码来源:mycurl.php


注:本文中的get_html函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。