本文整理汇总了PHP中get_web_page函数的典型用法代码示例。如果您正苦于以下问题:PHP get_web_page函数的具体用法?PHP get_web_page怎么用?PHP get_web_page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_web_page函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: delProxy
function delProxy($id, $url = '')
{
global $config;
cdim('db', 'query', 'DELETE FROM `proxy` WHERE `id` = ' . $id);
$ex = strpos($url, '?') === false ? '?' : '&';
$url = $url . $ex . 'del=true&delpass=' . DELPASS;
$qq = get_web_page($url);
//file_put_contents('bbb.bbb', 'checkurl4u.php->DEL PROXY'."\r\n\r\n", FILE_APPEND);
}
开发者ID:insecuritea,项目名称:malware_sources,代码行数:9,代码来源:checkurl4u82472835273762.php
示例2: get_http_page
function get_http_page($url)
{
$result = get_web_page($url);
if ($result['errno'] != 0) {
die("{$url} get_http_page request error: " . $result['errno']);
}
if ($result['http_code'] != 200) {
die("{$url} get_http_page response error: " . $result['http_code']);
}
return $result['content'];
}
开发者ID:eparst,项目名称:ebay-amazon-sync-tool,代码行数:11,代码来源:curl.php
示例3: GetButch
public function GetButch()
{
$data = get_web_page($this->ecb_url);
$retarray = array();
$xml = new SimpleXMLElement($data['content']);
$arr = get_object_vars($xml->Cube->Cube);
for ($i = 0; $i < count($arr["Cube"]); $i++) {
$this->raw = get_object_vars($arr["Cube"][$i]);
$retarray[][strtolower($this->raw["@attributes"]["currency"])] = floatval($this->raw["@attributes"]["rate"]);
}
//var_dump($retarray);
return $retarray;
}
开发者ID:carriercomm,项目名称:Multicabinet,代码行数:13,代码来源:ecb.php
示例4: scrap_overstock_all
function scrap_overstock_all($url, $id)
{
$curl_result = get_web_page($url);
if ($curl_result['http_code'] == 200) {
$document = phpQuery::newDocument($curl_result['content']);
$result['offerprice'] = str_replace('$', '', pq_get_first_text('span[itemprop=price]'));
$result['prime'] = $result['quantity'] && $result['offerprice'] ? 'Yes' : 'No';
$result['scrapok'] = true;
} else {
$result['scrapok'] = false;
}
return $result;
}
开发者ID:eparst,项目名称:ebay-amazon-sync-tool,代码行数:13,代码来源:overstock.php
示例5: tc2info
function tc2info($tc)
{
$result = get_web_page("http://www.isimtescil.net/UyeKayitKisa.aspx?Type=ControlTCNo&TCNo=" . $tc);
/*if ( $result['errno'] != 0 )
echo "... error: bad url, timeout, redirect loop ...";
if ( $result['http_code'] != 200 )
echo "... error: no page, no permissions, no service ...";*/
$page = $result['content'];
list($IsValid, $ErrorCode, $NameSurname) = preg_split("/[\\s]*[|][\\s]*/", $page);
$info = array("IsValid" => $IsValid, "ErrorCode" => $ErrorCode, "NameSurname" => $NameSurname);
return $info;
}
开发者ID:seyyah,项目名称:f3kayOLD,代码行数:13,代码来源:tc.php
示例6: NetworkSettings_Ajax
function NetworkSettings_Ajax()
{
$smarty = smarty_init(dirname(__FILE__) . '/templates');
$data = $_REQUEST;
$response = array();
switch ($data['Action']) {
case 'LookupExternalIP':
$url = "http://ipinfo.io/ip";
$response['IP'] = get_web_page($url);
break;
}
echo json_encode($response);
}
开发者ID:rakesh-mohanta,项目名称:yunapbx,代码行数:13,代码来源:NetworkSettings_Ajax.php
示例7: getContent
function getContent()
{
$url = 'http://php-academy.kiev.ua/';
$res = get_web_page($url);
//Получаем контент с сайта
if ($res['errno'] != 0 || $res['http_code'] != 200) {
echo $res['errormsg'];
} else {
$file = file_get_contents($url);
file_put_contents('phpAcademy.txt', $file);
//сохраняем контент также в txt
return $content = str_get_html($res['data']);
}
}
开发者ID:vorobeyDjack,项目名称:php_parser,代码行数:14,代码来源:index.php
示例8: makeSure
public function makeSure($payAddress, $recAddress, $recValue, $txId)
{
$payAddress = trim($payAddress);
$recAddress = trim($recAddress);
define('UsedTxId', 1);
define('PayNotPass', 2);
define('RecNotPass', 3);
define('Passed', 4);
//define('')
$con = get_web_page($this->mkRequestTxUrl($txId));
$txinfo = json_decode($con['content']);
$outs = $txinfo->out;
$inputs = $txinfo->inputs;
//1.检测txid唯一性
$map['tx_id'] = $txId;
$has_used = M('store_order')->where($map)->count();
if ($has_used > 0) {
//发现已经使用过了该ID
return array(0, '已经使用过的ID。');
}
//2.查找付款的地址是否存在
$isPayAddressPassed = false;
foreach ($inputs as $k => $v) {
if ($v->prev_out->addr == $payAddress) {
$isPayAddressPassed = true;
}
}
if (!$isPayAddressPassed) {
return array(0, '出款地址不正确,请检查输入。');
}
//3.比对输出中是否存在全额付款的地址
$recValue = number_format($recValue, 5);
$isRecAddressPassed = false;
foreach ($outs as $k => $v) {
$value = number_format($v->value * 1.0E-8, 5);
if ($v->addr == $recAddress && ($value = $recValue)) {
$isRecAddressPassed = true;
}
}
if (!$isRecAddressPassed) {
return array(0, '付款信息不正确。请检查输入。');
} else {
return array(1, '通过验证。');
}
}
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:45,代码来源:PayModel.class.php
示例9: getimages
function getimages($url)
{
$url = trim($url);
if (strpos(strtoupper(trim($url)), "HTTP") === 0) {
//do nothing
} else {
$url = "http://" . $url;
}
$html3 = file_get_contents($url);
if (isset($ret)) {
$ret = $this->processhtml($html3, $url, $ret);
} else {
$ret = $this->processhtml($html3, $url, array());
}
if (count($ret) < 3) {
if (!function_exists('curl_init')) {
die('CURL is not installed!');
}
$ch = curl_init();
$thepage = get_web_page($url);
$html1 = $thepage['content'];
$ret = processhtml($html1, $url, $ret);
}
if (count($ret) < 3) {
$timeout = 15;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$html2 = curl_exec($ch);
curl_close($ch);
$ret = processhtml($html2, $url, $ret);
}
if (count($ret) < 3) {
$html4 = url_get_contents($url);
$ret = processhtml($html4, $url, $ret);
}
if (count($ret) < 3) {
$html5 = urlload($url);
$ret = processhtml($html5, $url, $ret);
}
//foreach ($ret as $key=>$value) {
// $img = explode("\n", $value);
// if (($img[1] == 99) && ($img[2] == 99)) {
//
// $thumbnail = imagecreatefromstring(file_get_contents($img[3]));
// $width = imagesx($thumbnail);
// $height = imagesy($thumbnail);
// ImageDestroy($thumbnail);
// if (trim($width) != "") {
// $value = sprintf('%07d', $height + $width) . "\n" . sprintf('%06d', $height) . "\n" . sprintf('%06d', $width) . "\n" . $img[3]
// }
// }
//}
//rsort($ret);
return $ret;
}
开发者ID:hasssammalik,项目名称:Pretastyler,代码行数:58,代码来源:get_images_helper.php
示例10: curl_error
$errmsg = curl_error($ch);
$header = curl_getinfo($ch);
curl_close($ch);
$header['errno'] = $err;
$header['errmsg'] = $errmsg;
$header['content'] = $content;
return $header;
}
?>
<?php
$ar = array("yahoo.com");
$i = 0;
//Read a web page and check for errors:
foreach ($ar as $url) {
$result = get_web_page($url);
if ($result['errno'] != 0) {
// ... error: bad url, timeout, redirect loop ...
if ($result['http_code'] != 200) {
// ... error: no page, no permissions, no service ...
$page = $result['content'];
}
}
//echo $page;
//print_r($result['content']);
$html = str_get_html($result['content']);
if (is_object($html)) {
$file = fopen("C:/xampp/htdocs/homepage/tests/" . $url . ".html", "w");
echo fwrite($file, $html);
fclose($file);
$t = $html->find("title", 0);
开发者ID:pavanastechie,项目名称:Fortutorials.com,代码行数:31,代码来源:getindex.php
示例11: get_web_page
<?php
$response = get_web_page('http://yandex.ru');
$html = new DOMDocument();
$html->loadHTML($response);
getValue($html, 'inline-stocks__item_id_1', 'USD:');
getValue($html, 'inline-stocks__item_id_23', 'EUR:');
/**
* Возвращает страницу в виде текста
* @param string $url адрес страницы
* @return string код страницы
*/
function get_web_page($url)
{
$options = array(CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true);
$ch = curl_init($url);
curl_setopt_array($ch, $options);
$content = curl_exec($ch);
curl_close($ch);
return $content;
}
/**
* [getValue description]
* @param object $dom объект DOMDocument()
* @param string $classname название класса на странице
* @param string $title название валюты
*/
function getValue(DOMDocument $dom, $classname, $title)
{
$finder = new DomXPath($dom);
$div = $finder->query("//*[contains(@class, '{$classname}')]");
开发者ID:singleton90,项目名称:yandex-rate,代码行数:31,代码来源:ya-rate.php
示例12: array_map
if (get_magic_quotes_gpc()) {
$_POST = array_map('strip_slashes_deep', $_POST);
$_GET = array_map('strip_slashes_deep', $_GET);
}
$cate = $_POST['pb_cate'];
$sql = dbq('SELECT * FROM nec_dealer WHERE id=' . $cate);
$dealer_type = $sql[0]['dealer_type'];
$dealer_type = str_replace(" ", "_", $dealer_type);
/**
* Get a web file (HTML, XHTML, XML, image, etc.) from a URL. Return an
* array containing the HTTP server response header fields and content.
*/
function get_web_page($url)
{
$options = array(CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => false, CURLOPT_ENCODING => "", CURLOPT_USERAGENT => "nec", CURLOPT_AUTOREFERER => true, CURLOPT_CONNECTTIMEOUT => 120, CURLOPT_TIMEOUT => 120, CURLOPT_MAXREDIRS => 10);
$ch = curl_init($url);
curl_setopt_array($ch, $options);
$content = curl_exec($ch);
$err = curl_errno($ch);
$errmsg = curl_error($ch);
$header = curl_getinfo($ch);
curl_close($ch);
$header['errno'] = $err;
$header['errmsg'] = $errmsg;
$header['content'] = $content;
return $header;
}
$a = get_web_page("http://www.nec-cds.com.au/webpublisher/tpl/new_pb_email.php?pb_cate=" . $cate);
$file_name = "tpl/pb_email/" . date('Y-m-d-H-i-s') . "-" . preg_replace('/[^a-z0-9]+/i', '-', $dealer_type) . "-email-id-" . $cate . ".html";
file_put_contents($file_name, $a['content']);
echo "{file:'{$file_name}'}";
开发者ID:nukem,项目名称:NEC,代码行数:31,代码来源:gen_email_file.php
示例13: test_paypal
curl_close ($ch);
}
test_paypal() ;*/
if (isset($session->userid) && isset($_POST['item_name_1']) && isset($_POST['amount_1']) && $_POST['amount_1'] != 0) {
//$invoiceid = $database->getNextInvoice($session->userid, stripslashes($_POST['amount_1'],'START');
$invoiceid = 1;
$values = "cmd=_cart";
$values .= "&upload=1";
$values .= "&business=" . PAYPAL_ACCOUNT;
$values .= "&invoice=" . $invoiceid;
if (isset($_POST['item_name_1']) && isset($_POST['amount_1'])) {
$values .= "&item_name_1=" . stripslashes($_POST['item_name_1']);
$values .= "&amount_1=" . stripslashes($_POST['amount_1']);
}
get_web_page(PAYPALADDRESS, $values);
}
function get_web_page($url, $curl_data)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.sandbox.paypal.com/cgi-bin/webscr");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'cmd=_cart&upload=1&[email protected]&item_name1=aggregate%20items&amount=10.00');
$content = curl_exec($ch);
//echo 'hi';
curl_close($ch);
// $header['errno'] = $err;
// $header['errmsg'] = $errmsg;
// $header['content'] = $content;
开发者ID:xavier-s-a,项目名称:zidisha,代码行数:31,代码来源:paypal.php
示例14: foreach
$eachtim = 0;
$bodytext = '';
foreach ($xml->song as $song) {
++$eachtim;
if (!file_exists('img/')) {
mkdir('img/');
}
$dir = 'img/' . preg_replace('/[\\<\\>\\:\\"\\/\\\\\\|\\?\\*]/', '', $song->artist) . ' - ' . preg_replace('/[\\<\\>\\:\\"\\/\\\\\\|\\?\\*]/', '', $song->album) . '/';
if (!file_exists($dir) || !file_exists($dir . '60x60.jpg') || !file_exists($dir . '1200x1200.jpg')) {
$response = get_web_page('http://itunes.apple.com/search?country=US&media=music&term=' . urlencode($song->artist) . '+' . urlencode($song->album));
$resArr = array();
$resArr = json_decode($response);
if (!isset($resArr->results[0]->artworkUrl100) || empty($resArr->results[0]->artworkUrl60) || !$resArr->results[0]->artworkUrl60) {
$urlartistreplace = urlencode(preg_replace("/(\\s[a-zA-Z]+\\.)?\\s([a-zA-Z0-9_&#\\-\\\\\\/%\\(\\)]+)\$/", '', preg_replace('/\\+/', ' ', urlencode($song->artist))));
$urlalbumreplace = urlencode(preg_replace("/(\\s[a-zA-Z]+\\.)?\\s([a-zA-Z0-9_&#\\-\\\\\\/%\\(\\)]+)\$/", '', preg_replace('/\\+/', ' ', urlencode($song->album))));
$response = get_web_page('http://itunes.apple.com/search?country=US&media=music&term=' . $urlartistreplace . '+' . $urlalbumreplace);
$resArr = array();
$resArr = json_decode($response);
}
if (!file_exists($dir)) {
mkdir($dir);
}
if (!file_exists($dir . '60x60.jpg')) {
copy($resArr->results[0]->artworkUrl60, $dir . '60x60.jpg');
}
if (!file_exists($dir . '1200x1200.jpg')) {
copy(str_replace('100x100', '1200x1200', $resArr->results[0]->artworkUrl100), $dir . '1200x1200.jpg');
}
}
$url = 'img/' . str_replace('+', '%20', urlencode(preg_replace('/[\\<\\>\\:\\"\\/\\\\\\|\\?\\*]/', '', $song->artist))) . '%20-%20' . str_replace('+', '%20', urlencode(preg_replace('/[\\<\\>\\:\\"\\/\\\\\\|\\?\\*]/', '', $song->album)));
$art = $url . '/1200x1200.jpg';
开发者ID:jaketr00,项目名称:saveMusicInfo,代码行数:31,代码来源:index.php
示例15: get_web_page
<description>Just another WordPress weblog</description>
<lastBuildDate>Thu, 20 May 2010 12:14:53 +0000</lastBuildDate>
<generator>http://wordpress.org/?v=2.9.2</generator>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<item>
<title>Unable to Load ArrowChat Blog</title>
<link>http://www.arrowchat.com/blog/</link>
<comments>http://www.arrowchat.com/blog/</comments>
<pubDate>Thu, 20 May 2010 12:14:53 +0000</pubDate>
<dc:creator>admin</dc:creator>
<category><![CDATA[Versions]]></category>
<guid isPermaLink="false">http://www.arrowchat.com/blog/</guid>
<description><![CDATA[The cURL PHP library is not installed on your server, so we cannot deliver the ArrowChat blog to your admin panel. However, you can click the above link to visit our blog.]]></description>
<wfw:commentRss>http://www.arrowchat.com/blog/?feed=rss2</wfw:commentRss>
<slash:comments>0</slash:comments>
</item>
</channel>
</rss>';
}
// Figure out if cURL is installed
if (function_exists('curl_init')) {
$result = get_web_page($_REQUEST['url']);
$buffer = $result['content'];
} else {
$buffer = no_curl_installed();
}
header('Content-type: application/xml');
echo $buffer;
开发者ID:EduardoAugusto2015,项目名称:work2015,代码行数:31,代码来源:functions_proxy_rss.php
示例16: get_web_page
<?php
$url = "http://192.168.43.189/SWITCH";
echo $page = get_web_page($url);
开发者ID:piyush-arora,项目名称:Web_Development,代码行数:4,代码来源:test2.php
示例17: get_web_page
<?php
echo get_web_page("localhost:8080/quality/" . $_GET['jobId'] . "/psnr/googleChart");
/*$psnrWhenInfinity = 100;
$response = get_web_page("localhost:8080/quality/test");
$json_rep = json_decode($response);
$status = $json_rep->{"status"};
if($status == "FINISHED") {
$represenstations = $json_rep->{"results"};
$numberResults = count($represenstations);
$results = $represenstations[0]->{"results"};
$chartJson = "{ 'cols':[ {'label':'Frame number','type':'number'}";
for($i = 0; $i < $numberResults; $i++) {
$chartJson = $chartJson . ",{'label':'PSNR (dB) " . $represenstations[$i]->{"bitrate"} . "','type':'number'}";
}
$chartJson = $chartJson . "],'rows':[";
$col = 1;
for($i = 0; $i < $numberResults; $i++) {
$values[$i] = $represenstations[$i]->{"results"};
}
for($j = 0; $j < count($values[0]); $j++) {
$chartJson = $chartJson . "{ 'c':[{'v':" . $col . "}";
for($i = 0; $i < $numberResults; $i++) {
$psnrvalue = $represenstations[$i]->{"results"}[$j];
if($psnrvalue == "Infinity") {
$chartJson = $chartJson . ",{'v': " . $psnrWhenInfinity . "}";
}
else {
$chartJson = $chartJson . ",{'v': " . $psnrvalue . "}";
开发者ID:TheElk205,项目名称:qualityWeb,代码行数:31,代码来源:getData.php
示例18: get_dell_warranty_days
function get_dell_warranty_days($this_serial_number)
{
// We assume this is a UK machine, if US, use the second URL, since the US like their dates to be a little strange ;¬)
//
$this_url = "http://support.euro.dell.com/support/topics/topic.aspx/emea/shared/support/my_systems_info/en/details?c=uk&l=en&s=gen&servicetag=";
//$this_url="http://support.dell.com/support/topics/global.aspx/support/my_systems_info/en/details?c=uk&cs=usbsdt1&servicetag=";
// Add the serial number to the URL
$this_url = $this_url . $this_serial_number;
$this_web_page = get_web_page($this_url);
//print_r($this_web_page);
$this_content = $this_web_page[content];
$content = file_get_contents_utf8($this_url, FALSE, NULL, 0, 20);
// Objective, find the fields on the Dell Warranty page - Description Provider Start Date End Date Days Left
// Search for the string of the warranty date fields
//
// $this_string is a unique string on the warranty page just before the first date field
//
// this gives us an offset from the start of the page to look for the first field (Start Date)
// from this, we need to look for the first 'contract_oddrow' characters this will give us the first
// character of the date, but since the date is not fixed length, we then need to read up to the start of the next tag '<'
// Next we look for the start of the next field, read the next date using the same method, and finally look for the days remaining
// which is slightly more complicated as it is either a number at the end of a next field or a zero surrounded by <b> and <red> tags
// Search for the string at the start of the date fields
//
$this_string = "DELL</td><td class=";
// $this_string = '\"<td class=\"contract_oddrow\">DELL<\/td><td class=\"contract_oddrow\">';
//Find the start of the data
$this_warranty_data_pos = stripos($content, $this_string, 0);
// define the offset for the start date
//$this_string = '<td class=\"contract_oddrow\">';
$this_string = 'contract_oddrow';
$this_end_string = '<';
$this_warranty_start_date_offset = stripos($content, $this_string, $this_warranty_data_pos) + 17;
$this_warranty_start_date_length = stripos($content, $this_end_string, $this_warranty_start_date_offset) - $this_warranty_start_date_offset;
$this_warranty_end_date_offset = stripos($content, $this_string, $this_warranty_start_date_offset) + 17;
$this_warranty_end_date_length = stripos($content, $this_end_string, $this_warranty_end_date_offset) - $this_warranty_end_date_offset;
$this_warranty_start_date_pos = $this_warranty_start_date_offset;
$this_warranty_end_date_pos = $this_warranty_end_date_offset;
$this_warranty_start_date = substr($content, $this_warranty_start_date_pos, $this_warranty_start_date_length);
$this_warranty_end_date = substr($content, $this_warranty_end_date_pos, $this_warranty_end_date_length);
if (isset($timezone)) {
date_default_timezone_set($timezone);
} else {
date_default_timezone_set('Europe/London');
}
$warranty_days_left = strtotime($this_warranty_end_date);
$this_date = strtotime("now");
if (is_like_a_date($this_warranty_end_date)) {
//
$date = explode("/", $this_warranty_end_date);
//var_dump(checkdate($date[1], $date[0], $date[2]));
// echo "Warranty End date ".date("D d M Y",mktime(0,0,0,$date[1],$date[0],$date[2]))." ";
// Convert to US style date, (not needed if you use the US web page...)
$this_us_date = mktime(0, 0, 0, $date[1], $date[0], $date[2]);
$days_left = $this_us_date - $this_date;
} else {
$days_left = 0;
}
// If we are over the warrenty period we always have zero
if ($days_left < 0) {
$days_left = 0;
} else {
}
// $days_left = get_formated_duration($days_left);
$days_left = get_days_left($days_left);
// echo "Warranty Remaining ".$days_left." days.";
return $days_left;
}
开发者ID:kumarsivarajan,项目名称:ctrl-dock,代码行数:68,代码来源:include_dell_warranty_functions.php
示例19: get_final_url
// Might need to start using composer + Guzzle one day :)
$url = get_final_url($url);
// Load page
$result = get_web_page($url);
if ($result['http_code'] != 200) {
error("Az oldal nem elérhető");
}
$page = $result['content'];
// Page loaded, get the embed link
preg_match("~" . $embedPattern . "~", $page, $hash);
if (sizeof($hash) < 2) {
error("A videó hash nem található", $hotlink);
}
$hash = $hash[1];
}
// Get video URL
$result = get_web_page(INDA_AMFPHP . $hash);
if ($result['http_code'] != 200) {
error("Az amfphp nem elérhető");
}
$page = $result['content'];
$page = json_decode($page);
if (!isset($page->data->video_file)) {
error("A videó linkje nem található", $hotlink);
}
if ($hotlink) {
header('Location:' . $page->data->video_file);
exit;
} else {
die(json_encode(['success' => true, 'video_url' => $page->data->video_file]));
}
开发者ID:JohnTheBoss,项目名称:indadl,代码行数:31,代码来源:downloader.php
示例20: array
<?php
include "libcurl.php";
include "rules.php";
$rule_hits = array();
$sentences = array();
define("MAX_RULES", 4);
$query = "flipkart";
$page = "http://en.wikipedia.org/wiki/Flipkart";
//$page="http://en.wikipedia.org/wiki/Mahatma_Gandhi";
/*$sentence="next sale is scheduled for oct 14, 2014";
$i=20;
process_sentence($sentence,$i);
exit();*/
$header = get_web_page($page);
$http_code = $header['http_code'];
if ($http_code == 0) {
echo "Could not connect to server\n";
exit(1);
}
$content = $header['content'];
process_page($content);
printf("max_rules=%d\n", MAX_RULES);
//Now process the rule_hits array
foreach ($rule_hits as $sentence_hits) {
$event = array();
foreach ($sentence_hits as $hit) {
print_r($hit);
$event['sid'] = $hit['sid'];
if (isset($hit['day'])) {
$event['day'] = $hit['day'];
开发者ID:saradhix,项目名称:entity_time_lines,代码行数:31,代码来源:etl.php
注:本文中的get_web_page函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论