Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linuxÏÂcurlÃüÁîÏê½â


CurlÊÇLinuxÏÂÒ»¸öºÜÇ¿´óµÄhttpÃüÁîÐй¤¾ß£¬Æ书ÄÜÊ®·ÖÇ¿´ó¡£
1) ¶þ»°²»Ëµ£¬ÏÈ´ÓÕâÀ↑ʼ°É£¡
$ curl http://www.linuxidc.com
»Ø³µÖ®ºó£¬www.linuxidc.com µÄhtml¾ÍÏ¡ÀﻩÀ²µØÏÔʾÔÚÆÁÄ»ÉÏÁË    ~
2) àÅ£¬ÒªÏë°Ñ¶Á¹ýÀ´Ò³Ãæ´æÏÂÀ´£¬ÊDz»ÊÇÒªÕâÑùÄØ£¿


$ curl http://www.linuxidc.com > page.html
µ±È»¿ÉÒÔ£¬µ«²»ÓÃÕâôÂé·³µÄ£¡
ÓÃcurlµÄÄÚÖÃoption¾ÍºÃ£¬´æÏÂhttpµÄ½á¹û
£¬
ÓÃÕâ¸öoption: -o
$ curl -o page.html http://www.linuxidc.com
ÕâÑù£¬Äã¾Í¿ÉÒÔ¿´µ½ÆÁÄ»ÉϳöÏÖÒ»¸öÏÂÔØÒ³Ãæ½ø¶Èָʾ¡£µÈ½øÕ¹µ½100%£¬×ÔÈ»¾Í OK¿©
3) ʲôʲô£¿£¡·ÃÎʲ»µ½£¿¿Ï¶¨ÊÇÄãµÄproxyûÓÐÉ趨ÁË¡£
ʹÓÃcurlµÄʱºò£¬ÓÃÕâ¸öoption¿ÉÒÔÖ¸¶¨http·ÃÎÊËùʹÓõÄproxy·þÎñÆ÷¼°Æä¶Ë¿Ú£º -x
$ curl -x 123.45.67.89:1080 -o page.html http://www.linuxidc.com
4) ·ÃÎÊÓÐЩÍøÕ¾µÄʱºò±È½ÏÌÖÑᣬËûʹÓÃcookieÀ´¼Ç¼sessionÐÅÏ¢¡£
ÏñIE/NNÕâÑùµÄä¯ÀÀÆ÷£¬µ±È»¿ÉÒÔÇáÒ×´¦ÀícookieÐÅÏ¢£¬µ«ÎÒÃǵÄcurlÄØ£¿.....
ÎÒÃÇÀ´Ñ§Ï°Õâ¸öoption: -D <— Õâ¸öÊÇ°ÑhttpµÄresponseÀïÃæµÄcookieÐÅÏ¢´æµ½Ò»¸öÌرðµÄÎļþÖÐÈ¥
$ curl -x 123.45.67.89:1080 -o page.html -D cookie0001.txt
http://www.linuxidc.com
ÕâÑù£¬µ±Ò³Ãæ±»´æµ½page.htmlµÄͬʱ£¬cookieÐÅÏ¢Ò²±»´æµ½ÁËcookie0001.txtÀïÃæÁË
5£©ÄÇô£¬ÏÂÒ»´Î·ÃÎʵÄʱºò£¬ÈçºÎ¼ÌÐøʹÓÃÉÏ´ÎÁôϵÄcookieÐÅÏ¢ÄØ£¿ÒªÖªµÀ£¬ºÜ¶àÍøÕ¾¶¼ÊÇ¿¿¼àÊÓÄãµÄcookieÐÅÏ¢£¬À´ÅжÏÄãÊDz»ÊDz»°´¹æ
¾Ø·ÃÎÊËûÃǵÄÍøÕ¾µÄ¡£
Õâ´ÎÎÒÃÇʹÓÃÕâ¸öoptionÀ´°ÑÉϴεÄcookieÐÅÏ¢×·¼Óµ½http requestÀïÃæÈ¥£º -b
$ curl -x 123.45.67.89:1080 -o page1.html -D cookie0002.txt -b
cookie0001.txt http://www.linuxidc.com
ÕâÑù£¬ÎÒÃǾͿÉÒÔ¼¸ºõÄ£ÄâËùÓеÄIE²Ù×÷£¬È¥·ÃÎÊÍøÒ³ÁË£¡
6£©ÉÔ΢µÈµÈ    ~ÎÒºÃÏñÍü¼ÇʲôÁË    ~
¶ÔÁË£¡ÊÇä¯ÀÀÆ÷ÐÅÏ¢
ÓÐЩÌÖÑáµÄÍøÕ¾×ÜÒªÎÒÃÇʹÓÃijЩÌض¨µÄä¯ÀÀÆ÷È¥·ÃÎÊËûÃÇ£¬ÓÐʱºò¸ü¹ý·ÖµÄÊÇ£¬»¹ÒªÊ¹ÓÃijЩÌض¨µÄ°æ±¾    
NND£¬ÄÄÀïÓÐʱ¼äΪÁËËüÈ¥ÕÒÕâЩ¹ÖÒìµÄä¯ÀÀÆ÷ÄØ£¡£¿
ºÃÔÚcurl¸øÎÒÃÇÌṩÁËÒ»¸öÓÐÓõÄoption£¬¿ÉÒÔÈÃÎÒÃÇËæÒâÖ¸¶¨×Ô¼ºÕâ´Î·ÃÎÊËùÐû³ÆµÄ×Ô¼ºµÄä¯ÀÀÆ÷ÐÅÏ¢£º -A
$ curl -A "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" -x
123.45.67.89:1080 -o page.html -D cookie0001


Ïà¹ØÎĵµ£º

linux ÕýÔò±í´ïʽѧϰ2

ÕýÔò±í´ïʽ(regular expression)
[code:1]ÕýÔò±í´ïʽ(regular expression)
--------------------------------------------------------------------------------
¹Ø¼ü×Ö£º ÕýÔò±í´ïʽ£¬Regular Expression
Ô­Öø£ºÐ¦ÈÝ
´´×÷ÓÚ£º2004Äê05ÔÂ03ÈÕ
×îºó¸üУº2004Äê05ÔÂ04ÈÕ 21&#58;12
°æȨÉùÃ÷£ºÊ¹Óô´×÷¹«ÓðæÈ¨Ð­Ò ......

VMWareÀïLinuxʹÓÃMINICOMʵÏÖÓ뿪·¢°åµÄͨѶ(ת)

×î½üÔÚһЩǶÈëʽ¿ª·¢ÈºÀïÃæ»òÕßÂÛ̳ÉÏ¿´¼ûһЩÅóÓÑÔÚÌÖÂÛÔõôÔÚÐéÄâ»úÀïÃæʹÓÃminicomÓ뿪·¢°åͨѶ£¬±Ï¾¹»¹ÓкöàÏñÎÒÕâÑùÔÚÐéÄâ»úÀïÃæÓÃLinuxµÄÅóÓÑ¡£ÏÂÃæµÄ·½·¨½öÊDZ¾ÈËÔÝʱʹÓò¢ÇÒ»¹ÄÜÐеÃͨµÄ·½·¨£¬Ï£Íû´ó¼Ò»¹ÄÜÕÒµ½¸üºÃµÄ·½·¨£¬²»¹ý±ðÍüÁËÒ²¸øСµÜ֪ͨһÏ°¡£¬¼ÇµÃ¿ªÔ´¾«ÉñŶ£¬
¿ªÊ¼Ö®Ç°ÏÈ˵һÏÂ×Ô¼ºµÄϵͳ ......

¡¾ÀíÂÛ֪ʶƪ¡¿Linux»ìºÏ±à³Ì+log4cpp


     ÓÉÓÚҪʹÓõ½log4cppµÄ¿â£¬¶ølog4cµÄ×ÊÁÏÊǷdz£µÄÉÙ£¬Ò²ÀÁµÃÈ¥Ñо¿ËüµÄÓ÷¨£¬ÓÚÊǾ;ö¶¨ÊÔÊÔ»ìºÏ±à³ÌÕßÍæÒâ¡£
      Ê×ÏÈÏÈÒýÓÃÏÂC++ËüµÄfather: StroustrupµÄһƪÎÄÕ¡¶C++ Style and Technique FAQ¡·£¨http://www2.research.att.com/~bs/bs_faq2.html£©ÀïµÄһС¸öÆ ......

¹È¸èAndroid±»LinuxÄں˳ýÃû






<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
       ¹È¸èºÜÅ£Æø£¬¸ù±¾²»Àí»á
Linux
Äں˿ª·¢ÍŶӣ¬½á¹û±»³ýÃû¡£¿É±¯Ò²£¡
 
    2
ÔÂ
3
ÈÕ£¬
Linux
Äں˿ª·¢Õß
Greg
Kroah-Hartman
½«
Android
µÄÇý¶¯³ÌÐò´ ......

linux shell script Àý×Ó1

1. ÈçºÎ»ñµÃ½Å±¾²ÎÊý£º
#!/bin/she
#
while [ -n "$1" ]
do
case "$1" in
-a) echo "found the -a option";;
-b) param="$2"
echo "found the -b option";;
-c) echo "found the -c option";;
--) shift
break;;
*) echo "$1 is not an option";;
esac
shift
done
count ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ