1.å°å·ç¨åºçç¹ç¹
å°å·ç¨åºçç¹ç¹
1ãå¯ä»¥éé%以ä¸çç«ç¹ï¼åªéç®åçå¨åå°é ç½®ééæ¿æ¢è§åå³å¯ã2ãçªç ´å¾çé²çé¾ç³»ç»ï¼å¯ä»¥å°ç®æ ç«çå¾çä¸è½½å°æå¡å¨ä¸é¢ï¼æé«è®¿é®æçï¼å¢å ç¾åº¦å¾ççæ¶å½ã
3ãæ¯æéæçæï¼å³ä½¿ç®æ ç«æå¡å¨åºç°é误ï¼æ¬ç«ä¾ç¶ä¸åå½±åï¼åææ¯å¼å¯éæçæåå¾çä¸è½½å°æ¬å°æå¡å¨ï¼ã
4ãææçå¯ä»¥å¯ç¨å ¨å½åç«åè½ï¼èªå¨äº§çé¿å°¾å ³é®åï¼éåå ¨å½æå¡è¡ä¸åä¿¡æ¯æ¥è¯¢æå¡ã
è¯è¨ä»£ç ã1.Perl
#!/usr/bin/perl
# éè¿IEæµè§å¨ä¸ç[æ¥ç]->[æºæ件]å¯çHTMLæ件å 容ã
# perlä¸å¯ä»¥ä¸éè¿æµè§å¨ç´æ¥åå¾HTMLæ件å 容ï¼ç¨ç
# å°±æ¯perl模ålibWWW
use strict;
use LWP::UserAgent;
use threads::shared;
my $URL = /cgi-bin/news_qq_search?防盗微宝石源码city=&city&
è¿é设置éè¦æåç页é¢å°åï¼å½ç¶ä½ ä¹å¯ä»¥ç´æ¥æå®æ个å°åèä¸ä½¿ç¨åé
wstr=getHTTPPage(url)
è·åæå®é¡µé¢çå ¨é¨æ°æ®
start=Newstring(wstr, <html>)
è¿é设置éè¦å¤ççæ°æ®ç头é¨ï¼è¿ä¸ªåéåºè§ä¸åæ åµè设置ï¼å ·ä½å 容å¯ä»¥éè¿æ¥çéè¦æåç页é¢çæºä»£ç æ¥ç¡®å®ãå 为å¨è¿ä¸ªç¨åºéæ们éè¦æåæ´ä¸ªé¡µé¢,æ以设置为页é¢å ¨é¨æåã注æï¼è®¾ç½®çå å®¹å¿ é¡»æ¯é¡µé¢å 容å¯ä¸çï¼ä¸å¯ä»¥éå¤ã
over=Newstring(wstr, </HTML>)
åstartç¸å¯¹åºçå°±æ¯éè¦å¤ççæ°æ®çå°¾é¨ï¼åæ ·çï¼è®¾ç½®çå å®¹å¿ é¡»æ¯é¡µé¢ä¸å¯ä¸çã
body=mid(wstr,start,over-start)
â设置æ¾ç¤ºé¡µé¢çèå´
ä¸é¢å°±æ¯å¨ç¨ä¹¾å¤æªç§»+++çæ¶åäºï¼éè¿replaceå¯ä»¥ç¨ä¸äºå符æ¿æ¢ææ°æ®ä¸æå®çå符ã
body = replace(body,skin1,æ°æµªå¤©æ°é¢æ¥ - 麦å°å·ç½ç»)
body = replace(body,/cgi-bin/news_qq_search?city,tianqi.asp?id)
æ¬ç¨åºä¸å·²ç»å®æäºæ¿æ¢çå·¥ä½ï¼å¦ææå ¶ä»éè¦çè¯å¯ä»¥ç»§ç»è¿è¡ç±»ä¼¼çæ¿æ¢æä½ã
response.write body
%>
æ¿æ¢å®éè¦ä¿®æ¹çå 容åï¼å°±å¯ä»¥æä¿®æ¹çå 容æ¾ç¤ºå¨é¡µé¢ä¸äºãè³æ¤ç¨åºç»æ