»ùÓÚPHPÍøÒ³¿ìÕÕÀà
<?PHP
//====================================================
// FileName: snap.class.php
// Summary: ÍøÒ³¿ìÕÕÀà
// Author: millken(ÃÔ·ÁÖ¿Ï)
// LastModifed:2007-06-29
// copyright (c)2007 [email]millken@gmail.com[/email]
//====================================================
class snap{
var $dir;
var $log;
var $contents;
var $filename;
var $host;
var $name;
var $data_ts;
var $ttl;
var $url;
var $ts;
function snap(){
$this->log = "New snap() object instantiated.<br />\n";
$this->dir = dirname(__FILE__)."/";
}
function fetch($url="",$ttl=10){
Ïà¹ØÎĵµ£º
<?php
/********************************************************************
* FileName: class.msn.php
* by changwei, 2010-4-13
* Contact MSN: changwei0112@hotmail.com
* »ñÈ¡MSNºÃÓÑEmailÁбí
*
========================== ......
<?php
set_time_limit(0);
$url='http://item.taobao.com/auction/item_detail.htm?xid=0db2&item_num_id=4512430274&cm_cat=50000671&pm2=1';
$ch = curl_init();
$timeout = 10;
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CU ......
//»Ø³µ£º[\n\r\t]
$reg="|typeid=\"(.*)\" onsel.*[\n\r\t]*<a href="\" mce_href="\""#\">(.*)</a>|";
preg_match_all ($reg,
$html,
$out, PREG_PATTERN_ORDER);
foreach ($out as $value){
foreach ($value as $value2){
if(strlen($value2)<20)
echo ($value2."<br>");
}
} ......
PHP³ÌÐòºÍMySqlÊý¾ÝÂÒÂëÎÊÌâÔÒò¼°½â¾ö
ÂÒÂëÎÊÌâ¼òµ¥Ëµ¾ÍÊÇÊý¾Ý¿âдÈë¶ÁÈ¡£¬ÍøÒ³Îļþ£¬ÍøÒ³ÏÔʾʱ¼¸¸ö»·½ÚµÄ±àÂë²»Ò»ÖÂÔì³ÉµÄ¡£
ÂÒÂëÎÊÌâ
дÈëʱ£ºÒ³ÃæÌáȡдÈëÊý¾Ý±àÂëºÍдÈëÊý¾Ý¿âʱ±àÂë²»Ò»ÖÂ
¶Áȡʱ£º¶ÁÈ¡ºóËùÓñàÂëÓëÊý¾Ý¿âдÈëʱ²»Ò»ÖÂ
ÏÔʾʱ£º±àÂëÓëÊý¾Ý¿â¶ÁÈ¡ºóµÄÊý¾Ý²»Ò»ÖÂ
ºÜÏÔȻֻÓÐÈýÕ߶¼Í³Ò»²ÅÐУ ......