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

ÍøÕ¾Ä£ÄâµÇ½±¸Íü£¨php + python£©

 php°æ£º
<?php
$cookie_file = fopen('cookie.txt','w');//dirname(__FILE__)."/cookie_".md5(basename(__FILE__)).".txt"; // ÉèÖÃCookieÎļþ±£´æÂ·¾¶¼°ÎļþÃû

function vlogin($url,$data){ // Ä£ÄâµÇ¼»ñÈ¡Cookieº¯Êý
$curl = curl_init(); // Æô¶¯Ò»¸öCURL»á»°
curl_setopt($curl, CURLOPT_URL, $url); // Òª·ÃÎʵĵØÖ·
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // ¶ÔÈÏÖ¤Ö¤ÊéÀ´Ô´µÄ¼ì²é
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // ´ÓÖ¤ÊéÖмì²éSSL¼ÓÃÜËã·¨ÊÇ·ñ´æÔÚ
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // Ä£ÄâÓû§Ê¹ÓõÄä¯ÀÀÆ÷
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // ʹÓÃ×Ô¶¯Ìø×ª
curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // ×Ô¶¯ÉèÖÃReferer
curl_setopt($curl, CURLOPT_POST, 1); // ·¢ËÍÒ»¸ö³£¹æµÄPostÇëÇó
curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // PostÌá½»µÄÊý¾Ý°ü
curl_setopt($curl, CURLOPT_COOKIEJAR, $GLOBALS['cookie_file']); // ´æ·ÅCookieÐÅÏ¢µÄÎļþÃû³Æ
curl_setopt($curl, CURLOPT_COOKIEFILE, $GLOBALS['cookie_file']); // ¶ÁÈ¡ÉÏÃæËù´¢´æµÄCookieÐÅÏ¢
curl_setopt($curl, CURLOPT_TIMEOUT, 30); // ÉèÖó¬Ê±ÏÞÖÆ·ÀÖ¹ËÀÑ­»·
curl_setopt($curl, CURLOPT_HEADER, 0); // ÏÔʾ·µ»ØµÄHeaderÇøÓòÄÚÈÝ
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // »ñÈ¡µÄÐÅÏ¢ÒÔÎļþÁ÷µÄÐÎʽ·µ»Ø
$tmpInfo = curl_exec($curl); // Ö´ÐвÙ×÷
if (curl_errno($curl)) {
echo 'Errno'.curl_error($curl);
}
curl_close($curl); // ¹Ø±ÕCURL»á»°
return $tmpInfo; // ·µ»ØÊý¾Ý
}

function vget($url){ // Ä£Äâ»ñÈ¡ÄÚÈݺ¯Êý
$curl = curl_init(); // Æô¶¯Ò»¸öCURL»á»°
curl_setopt($curl, CURLOPT_URL, $url); // Òª·ÃÎʵĵØÖ·
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // ¶ÔÈÏÖ¤Ö¤ÊéÀ´Ô´µÄ¼ì²é
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // ´ÓÖ¤ÊéÖмì²éSSL¼ÓÃÜËã·¨ÊÇ·ñ´æÔÚ
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // Ä£ÄâÓû§Ê¹


Ïà¹ØÎĵµ£º

PHP preg_match Ó÷¨

       ±¾º¯ÊýÒÔ pattern µÄ¹æÔòÀ´½âÎö±È¶Ô×Ö·û´® subject¡£±È¶Ô½á¹û·µ»ØµÄÖµ·ÅÔÚÊý×é²ÎÊý matches Ö®ÖУ¬matches[0] ÄÚÈݾÍÊÇÔ­×Ö·û´® subject¡¢matches[1] ΪµÚÒ»¸öºÏºõ¹æÔòµÄ×Ö·û´®¡¢matches[2] ¾ÍÊǵڶþ¸öºÏºõ¹æÔòµÄ×Ö·û´®£¬ÓàÀàÍÆ¡£ÈôÊ¡ÂÔ²ÎÊý matches£¬ÔòÖ»Êǵ¥´¿µØ±È¶Ô£¬ÕÒµ½Ôò·µ»ØÖµÎª tr ......

PHPÍøÕ¾¿ª·¢·½°¸£¨¿ª·¢ÐÂÈ˱ضÁ£©

Ò»¡¢¿ª·¢³ÉÔ±
a)ÏîÄ¿Ö÷¹Ü
b)Ò³ÃæÃÀ¹¤
c)Ò³Ãæ¿ª·¢
d)·þÎñ¶Ë³ÌÐò¿ª·¢
e)ϵͳÓëÊý¾Ý¹ÜÀí
f)²âÊÔÓë°æ±¾¿ØÖÆ
¶þ¡¢ ÍøÕ¾×鿪·¢¼òÃ÷Á÷³Ì
Èý¡¢ ¿ª·¢¹¤¾ßÓë»·¾³
a)·þÎñÆ÷ÅäÖÃ
i. WEB·þÎñÆ÷£º FreeBSD6.1+Apache2.0+PHP5.0£¬SVN°æ±¾¿ØÖÆ·þÎñ(½ö²âÊÔ»ú)¡£
ii.Êý¾Ý¿â·þÎñÆ÷£º WIN2003 server+SQL server 2000+MySQL5.0£¬CLUS ......

PHP 6½«È«ÃæÖ§³ÖUnicodeºÍ¹ú¼Ê»¯

 PHPChinaѶ£ºPHPºËÐÄ¿ª·¢ÕßAndrei ZmievskiÔÚ×î½ü¾ÙÐеÄ2009 Zend/PHP»áÒéµÄÖ÷Ìâ·¢ÑÔÖÐÌá³ö£º“ÔÚ½ÓÏÂÀ´µÄPHP6ÖØÒªÉý¼¶ÖУ¬½«Í¨¹ýÖ§³ÖUnicodeÀ´°ïÖú¿ª·¢ÕßÃÇд³öÄܹ»²¿Êðµ½¶à¸ö²»Í¬ÓïÑÔÊг¡µÄÓ¦ÓóÌÐò¡£”
¡¡¡¡ÉÌÒµ¿ª·¢ÖÐÈç¹ûÖ»ÊÇ¿ª·¢ÎªÌØÓïÑÔÊг¡µÄÓ¦ÓóÌÐò£¬¾Í»áʧȥÆäËûµØ·½µÄÉÌÒµ»ú»á¡£ÔçÔÚ2006Äê4Ô£ ......

PHP×Ö·û´®½Ì³Ì_trimº¯Êý

PHP trim() º¯Êý
¶¨ÒåºÍÓ÷¨
trim() º¯Êý´Ó×Ö·û´®µÄÁ½¶Ëɾ³ý¿Õ°××Ö·ûºÍÆäËûÔ¤¶¨Òå×Ö·û¡£
Óï·¨
trim(str,charlist)
 ²ÎÊý 1 strΪ´ý²Ù×÷µÄ×Ö·û´®£¬²ÎÊý 2 charlist ¿ÉÑ¡£¬Ö¸¶¨ÁËÏëҪȥ³ýµÄÌØÊâ·ûºÅ¡£
Èç¹ûµÚ¶þ¸ö²ÎÊýû¸øÖµ£¬Ô¤Éè»áÈ¥³ýÏÂÁÐÕâЩ×ÖÔª£º 
" " (ASCII 32 (0x20) ......

PHP serialize()ÐòÁл¯µÄʹÓÃ

¿ÉÒÔ½«Êý×éºÍ¶ÔÏóÖ±½Ó´æÈëÊý¾Ý¿âÖеÄijһ×ֶΡ£
ʹserialize()Êǽ«Êý×é·´ÐòÁл¯ÔÙ´æÈëÊý¾Ý¿â£¬ÐòÁл¯»°ÍêµÄÊý¾Ý¾ÍÊÇÒ»¸ö×Ö·û´®¡£
ÌáÈ¡µÄʱºò£¬ÓÃunserialize()·´ÐòÁл¯È¡£¬È¡³öÀ´µÄ»¹ÊǸöÊý×é¡£
$arr = array('value1','value2','value3');
$str = serialize($arr); //ÐòÁл¯
$new_str = unserialize($temp); //·´ÐòÁÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ