• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_html函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: die

            }
            if (!empty($player) && $points > 0 && $over > 0 && $under > 0) {
                $qd = $dbh->query("SELECT * FROM odds WHERE bookie_url = '{$bookie_url}' AND player_name = '{$player}' AND start_time = '{$time}'") or die($dbh->error . ' in ' . __FILE__ . ' line ' . __LINE__);
                $rd = $qd->fetch_assoc();
                if (is_null($rd)) {
                    $dbh->query("INSERT INTO odds (bookie_name, bookie_url, start_time, player_name, player_total, over, under, date_time) VALUES ('{$bookie_name}', '{$bookie_url}', '{$time}', '{$player}', " . $points . ", " . $over . ", " . $under . ", " . time() . ")") or die($dbh->error . ' in ' . __FILE__ . ' line ' . __LINE__);
                } else {
                    $dbh->query("UPDATE odds SET player_name = '{$player}', player_total = " . $points . ", over = " . $over . ", under = " . $under . ", date_time = " . time() . " WHERE id = " . $rd['id']) or die($dbh->error . ' in ' . __FILE__ . ' line ' . __LINE__);
                }
            }
        }
    }
}
/* <- planetwin365 */
/* -> dvoznak */
$str = get_html(dvoznak_url);
$html = str_get_html($str);
if (method_exists($html, 'find')) {
    if ($html->find('li#danas-sport-d_' . date('Y-m-d') . '-s_1-n_3970_i')) {
        foreach ($html->find('li#danas-sport-d_' . date('Y-m-d') . '-s_1-n_3970_i') as $li) {
            if ($li->find('a.s_item')) {
                foreach ($li->find('a.s_item') as $a) {
                    $player_url = 'http://dvoznak.com/' . $a->href;
                    $exec = shell_exec(phantomjs . ' --ignore-ssl-errors=true dvoznak.js "' . $player_url . '" "' . path . '/html/dvoznak.html" "' . user_agent . '"');
                    $player_html = str_get_html(file_get_contents(path . '/html/dvoznak.html'));
                    if (method_exists($player_html, 'find')) {
                        if ($player_html->find('div#nazivigraca')) {
                            $player = $dbh->real_escape_string(trim($player_html->find('div#nazivigraca', 0)->plaintext)) ?: '';
                        } else {
                            $player = '';
                        }
开发者ID:gto76,项目名称:bets,代码行数:31,代码来源:run.php


示例17: create_strategy_edit_item

            if ($row = $result->fetch_array()) {
                $arr_result = create_strategy_edit_item($row);
                $arr_result["ret"] = "OK";
                print get_html(json_encode($arr_result));
            } else {
                error_log("{$g_today} query strategy error. " . $mysqli->error . "\n", 3, './errors.log');
                printf("{$g_today} query strategy error. " . $mysqli->error . "\n");
                exit;
            }
            $result->close();
            $mysqli->close();
        } else {
            print get_html();
        }
    } else {
        print get_html();
    }
} else {
    if ($arr_req["Action"] == "GetAirportList") {
        #req: http://www.380747.com/PolicyManage/GJPolicyEdit.aspx?Action=GetAirportList&AreaLevel=0101010101&callback=jQuery111109532740074209869_1437057647685&_=1437057647689
        #res: jQuery111109532740074209869_1437057647685([{"text": "FUD-绥芬河机场", "value": "FUD"},{"text": "HEK-黑河机场", "value": "HEK"},{"text": "HRB-哈尔滨太平机场", "value": "HRB"},{"text": "JMU-佳木斯东郊机场", "value": "JMU"},{"text": "LDS-伊春林都机场", "value": "LDS"},{"text": "MDG-牡丹江海浪机场 ", "value": "MDG"},{"text": "NDG-齐齐哈尔三家子机场", "value": "NDG"},{"text": "OHE-漠河机场", "value": "OHE"},{"text": "YLN-依兰机场", "value": "YLN"},{"text": "JGD-加格达奇机场", "value": "JGD"},{"text": "DQA-大庆机场", "value": "DQA"}])
        #req: 亚洲(不含大陆): http://10.211.55.5/test_php/PolicyManage//GJPolicyEdit.php?Action=GetAirportList&AreaLevel=01&callback=jQuery111109700722498819232_1436879181111&_=1436879181119
        $id = intval($arr_req["AreaLevel"]);
        $callback = $arr_req["callback"];
        #printf("id: $id callback: $callback\n");
        $mysqli = sql_connect();
        $sql = "select type from three_code where id={$id}";
        $result = $mysqli->query("{$sql}");
        $arr_result = array();
        if (!$result) {
            error_log("{$g_today} query now_running error. " . $mysqli->error . "\n", 3, './errors.log');
开发者ID:xiaozhang535,项目名称:sola,代码行数:31,代码来源:GJPolicyEdit.php


示例18: isset

<?php

include_once 'includes/main.php';
include_once 'includes/Individual.php';
$post_data = isset($_REQUEST['post_data']) ? json_decode($_REQUEST['post_data'], true) : false;
if (isset($post_data)) {
    $individual_id = $post_data['individual_id'];
    $individual = new Individual($individual_id);
    $_SESSION['logged_in'] = true;
    $_SESSION['user'] = array('name_first' => $individual->find('name_first'), 'name_last' => $individual->find('name_last'), 'individual_id' => $individual_id, 'email' => $individual->find('email'));
}
echo_bootstrap(get_html(), array('css' => 'profile'));
function get_html()
{
    return <<<HTML
\t\t<main>
\t\t\t<h2>Welcome to your profile page</h2>
\t\t\t<p>Hello {$_SESSION['user']['name_first']}!</p>
\t\t\t<p>Welcome to your login page.</p>
\t\t</main>
HTML;
}
开发者ID:ryanostrom,项目名称:ryandevelops,代码行数:22,代码来源:profile.php


示例19: show_pdf

function show_pdf($id_)
{
    define('K_PATH_IMAGES', dirname(__FILE__) . '/media/image/');
    define('PDF_HEADER_LOGO', 'header.png');
    define('PDF_HEADER_LOGO_WIDTH', 20);
    require_once dirname(dirname(__FILE__)) . '/includes/tcpdf/tcpdf.php';
    $html = get_html($id_);
    // create new PDF document
    $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    // set document information
    $pdf->SetCreator(PDF_CREATOR);
    $pdf->SetAuthor('Ulteo OVD Administration Console ' . OVD_VERSION);
    $pdf->SetTitle('Archived session - ' . $id_);
    $pdf->SetSubject('Archived session - ' . $id_);
    $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, 'Archived session - ' . $id_, 'Ulteo OVD Administration Console ' . OVD_VERSION);
    // set header and footer fonts
    $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
    $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
    // set default monospaced font
    $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
    // set margins
    $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
    $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
    $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
    // set auto page breaks
    $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
    // set image scale factor
    $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    $pdf->AddPage();
    $pdf->writeHTML($html, true, false, true, false, '');
    $pdf->lastPage();
    $pdf->Output('Ulteo-OVD-Archived-session-' . $id_ . '.pdf', 'D');
    die;
}
开发者ID:bloveing,项目名称:openulteo,代码行数:34,代码来源:session-reporting.php


示例20: get_html

		}
		/* My own additions */
		.ui-datepicker-inline {
			background: white;
			padding: 5px;
		}
		.ui-datepicker-inline a {
			margin: 5px;
			text-decoration: underline;
		}
		.ui-datepicker-title {
			width: 50%;
			display: inline;
			font-weight: bold;
		}
		li {
			list-style-type: none;
		}
		li:before {
			content: '✔    ';
		}
		.excluded {
			color: #CCC;
		}
		.excluded:before {
			content: '✖    ';
		}
	</style>
<?php 
echo get_html('footer');
开发者ID:Jarry1250,项目名称:labs-bytesadded,代码行数:30,代码来源:index.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_html_lang函数代码示例发布时间:2022-05-15
下一篇:
PHP get_host_from_url函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap