<?php header("Content-Type: text/html; charset=UTF-8"); require("phpQuery.php"); $hj = QueryList::Query('http://mobile.csdn.net/',array("title"=>array('.unit h1','text'))); //dump($hj->data); $data = QueryList::Query('http://cms.querylist.cc/bizhi/453.html',array( 'image' => array('img','src') ))->data; // $data = QueryList::Query('http://cms.querylist.cc/google/list_1.html',array( 'link' => array('a','href') ))->data; $page = 'http://cms.querylist.cc/news/566.html'; $reg = array( 'title' => array('h1','text'), 'date' => array('.pt_info','text','-span -a',function($content){ $arr = explode(' ',$content); return $arr[0]; }), 'content' => array('.post_content','html','a -.content_copyright -script',function($content){ $doc = phpQuery::newDocumentHTML($content); $imgs = pq($doc)->find('img'); foreach ($imgs as $img) { $src = 'http://cms.querylist.cc'.pq($img)->attr('src'); $localSrc = 'w/'.md5($src).'.jpg'; $stream = file_get_contents($src); file_put_contents($localSrc,$stream); pq($img)->attr('src',$localSrc); } return $doc->htmlOuter(); }) ); $rang = '.content'; $ql = QueryList::Query($page,$reg,$rang); $data = $ql->getData(); dump($data);
? ???? ???? ???? ?????. PHP? ???? ?? ??? ?? ?? ?????, PHP ???? ?? ????? ???? ??? ?? ? DOM ?? ???? ?? ??? ? ????. ? ???? ?? ????jQuery? ????? ????? ????. jQuery? ???? ??? ??? ??? ???? ??? ??? ??? ?? ? ????.
? ???? ?? ???? ???? ????? ?? ???? ????? ????????. ?????? ???? ?? ??????! ? ???? ?? ???? ?? ?????? ?????. ??? ???? ???? ??? ????. ??? ??? ?? ??? ?? ??? ???? ????! ??? ?? ?? ??? ???? ????? ????. ???: admin@php.cn
?? ??
![[??] Apple ???? ????? ??(??? ???)](https://img.php.cn/upload/article/001/246/273/173501599196714.png)
24 Dec 2024
?? ?? ?? ?? Apple ????? ???? ???? ?? ???? ??? ?? ?????? ?????. ? ?????? ??? ?????? ???? ???? ??? ?????. ? ?? Apple ????(

29 Jul 2016
?????? ?????? PHP ????? ??? ?? ??: ???? HTML ?? ????? ???? ?? ??? ??? ???? ?? ?? ??? ??? ?? ???? ?? ??? ?? ?? ?????? ????? ???. ???. ?? ??? ?? ?? ?????? ???? ? ? ??? ?????? ?????. ??? ??? ??? ????. ??? ?? ??? ?????. <?php // -------------------------------- -- -------------------------------- // ??

29 Jul 2016
PHP ???? ??: PHP ???? ?? PHP ???? ?? ??(?? ???): ??? ?? ??? ?????. function get_referer(){ $se = 0; $url = $_SERVER["HTTP_REFERER"] //?? ?? ???? URL $str = str_replace("http://","",$url); //http:// ?? $strdomain =explore("/",$str) // "/" ?? $domain?? ?? = $strd

29 Jul 2016
???? ???? ??: ???? ???? ?? PHP ???? ?? ?? ?? ??? ???? ??? ??? ?? ????: <form name="form" method="post" action="login.php"></form> ??? ?? box: < input type="text" name="username" /> ?? ???? ???, ???? ? ?? ??? ?????. HTML5?? ??? ??? ??? ??? ??? ?? ??? ????. ???? ?? ??? ????

29 Jul 2016
??? ?? ??? ?? ?? ?????: ??? ?? ??? ?? ?? ????? ??? ?? ????(1): ? ??? ?????? ???? ??? ??? ??: # ------ --- --------------------- # # ??? ??? ?? 'author' # CREATE TABLE ??? ( author_id int (6) DEFAULT '0' NOT NULL auto_increment, first_name varchar(20)


??? ??

??? ?? ????? PHP ?????
??? ?? ????? PHP ?????

50?? ??? ??? PHP ???? ??
??? PHP ????, ??? ????? ??? ???? ?????

??? ???? ?? ?? PHP ?????
??? ???? ?? ?? PHP ?????
