Ç¿´óµÄPHPαÔìIPÍ·¡¢Cookies¡¢Reference¡¡
<?
$fp = fsockopen ("passport.baidu.com", 80,
$errno, $errstr, 30);
if (!$fp) {
echo "$errstr
($errno)<br>\n";
} else {
$msg="GET
/?login&username=lapiaotuan22&password=oyhz123456
HTTP/1.0\r\n";
$msg.="Host:passport.baidu.com \r\n";
$msg.="Referer:
http://passport.baidu.com/ \r\n";
$msg.="Client-IP:
202.101.201.11\r\n";
$msg.="X-Forwarded-For: 202.101.201.11\r\n";
//Ö÷ÒªÊÇÕâÀïÀ´¹¹ÔìIP
$msg.="Connection: Close\r\n\r\n";
fputs ($fp,
$msg);
while (!feof($fp)) {
echo fgets ($fp,1024);
}
fclose
($fp);
}
?>
HTTP-REFERERÕâ¸ö±äÁ¿ÒѾԽÀ´Ô½²»¿É¿¿ÁË£¬ÍêÈ«¾ÍÊÇ¿ÉÒÔαÔì³öÀ´µÄ¶«¶«¡£
ÒÔÏÂÊÇαÔì·½·¨£º
PHP(Ç°ÌáÊÇ×°ÁËcurl):
PHP´úÂë
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, "http://www.dc9.cn/xxx.asp
");
curl_setopt ($ch, CURLOPT_REFERER, "http://www.dc9.cn/
");
curl_exec ($ch);
curl_close ($ch);
PHP(²»×°curlÓÃsock)
PHP´úÂë
$server = 'www.dc9.cn';
$host = 'www.dc9.cn';
$target = '/xxx.asp';
$referer =
'http://www.dc9.cn/'; // Referer
$port = 80;
$fp = fsockopen($server,
$port, $errno, $errstr, 30);
if (!$fp)
{
echo "$errstr
($errno)<br />\n";
}
else
{
$out = "GET $target
HTTP/1.1\r\n";
$out .= "Host: $host\r\n";
$out .= "Cookie:
ASPSESSIONIDSQTBQSDA=DFCAPKLBBFICDAFMHNKIGKEG\r\n";
$out .= "Referer:
$referer\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp))
{
echo fgets($fp, 128);
}
fclose($fp);
}
IPÒ²¿ÉÒÔαÔì
$fp = fsockopen ("192.168.0.128", 80, $errno, $errstr, 30);
if (!$fp)
{
echo "$errstr ($errno)<br>\n";
} else {
$msg="GET /003.php
HTTP/1.0\r\n";
$msg.="Host: 192.168.0.128\r\n";
$msg.="Referer: http://www.baidu.com\r\n
";
$msg.="Client-IP: 1.1.1.1\r\n";
$msg.=&quo
Ïà¹ØÎĵµ£º
¹ØÓÚJQuery ²å¼þGridµÄѧϰʹÓÃ±Ê¼Ç (PHP°æ)
ÔÚ¿ª·¢WEBÓ¦ÓóÌÐòʱ£¬ÎÒÃǻᾳ£ºÍÊý¾Ý´ò½»µÀ£¬¶øÊý¾Ýͨ³£¶¼ÊÇͨ¹ý±í¸ñµÄÐÎʽÀ´½øÐÐÏÔʾ¡£¶øÔÚjQueryÖУ¬ÓÐÒ»¸öGrid²å¼þ£¬
ËüÔÚ´¦ÀíÊý¾Ýʱ¹¦ÄÜÒì³£µÄÇ¿´ó£¬Äܼ¸ºõÂú×ãÎÒÃǵÄËùÓÐÐèÇ󡣿ÉνÎ޵С£×ÁÄ¥ÁËGridºÃ¼¸Ì죬ÖÕÓÚÔÚÍøÉÏÕÒµ½ÁËÒ»¸ö·Ç³£°ôµÄÑ§Ï ......
$_SERVER['PHP_SELF'] º¯ÊýÓ÷¨ #µ±Ç°ÕýÔÚÖ´Ðнű¾µÄÎļþÃû£¬Óë document rootÏà¹Ø¡£
$_SERVER['argv'] º¯ÊýÓ÷¨ #´«µÝ¸ø¸Ã½Å±¾µÄ²ÎÊý¡£
$_SERVER['argc'] º¯ÊýÓ÷¨ #°üº¬´«µÝ¸ø³ÌÐòµÄÃüÁîÐвÎÊýµÄ¸öÊý£¨Èç¹ûÔËÐÐÔÚÃüÁîÐÐģʽ£©¡£
$_SERVER['GATEWAY_INTERFACE'] º¯ÊýÓ÷¨ #·þÎñÆ÷ʹÓÃµÄ CGI ¹æ·¶µÄ°æ±¾¡£ÀýÈ磬&ldqu ......
Æ¥ÅäÖÐÎÄ×Ö·ûµÄÕýÔò±í´ïʽ£º [\u4e00-\u9fa5]
ÆÀ×¢£ºÆ¥ÅäÖÐÎÄ»¹ÕæÊǸöÍ·ÌÛµÄÊ£¬ÓÐÁËÕâ¸ö±í´ïʽ¾ÍºÃ°ìÁË
Æ¥ÅäË«×Ö½Ú×Ö·û(°üÀ¨ºº×ÖÔÚÄÚ)£º[^\x00-\xff]
ÆÀ×¢£º¿ÉÒÔÓÃÀ´¼ÆËã×Ö·û´®µÄ³¤¶È£¨Ò»¸öË«×Ö½Ú×Ö·û³¤¶È¼Æ2£¬ASCII×Ö·û¼Æ1£©
Æ¥Åä¿Õ°×ÐеÄÕýÔò±í´ïʽ£º\n\s*\r
ÆÀ×¢£º¿ÉÒÔÓÃÀ´É¾³ý¿Õ°×ÐÐ
Æ¥ÅäHTML±ê¼ÇµÄÕýÔò±í´ïʽ£º ......
<?php
/**
* @author qqzer.com
* @copyright 2010
*/
function baidu_decode($url,$sertim='',$k=array())
{
$E=strlen($url);
$C="";
$I=array();
$F=array();
$J=$sertim % 26;
$J=$J?$J:1;
foreach((array)$k as $str){
list($O,$L,$M) = explode(',',$str);
for($N=$O;$N<=$L;$N++){
......
¡¾2010/3/8¡¿
1:
array_pop($array());//phpÖÐɾ³ýÊý×é×îºóÒ»¸öÔªËØ
array_shift($array());//ɾ³ýµÚÒ»¸öÔªËØ
2:
java1.5ÉÏдµÄ³ÌÐò£¬È÷ÅÔÚjava1.4µÄ·þÎñÆ÷ÉÏÔËÐУ¬ÈçºÎ°ì£¬ÉÏÍøËÑË÷ÁËһϣ¬
¿ÉÒÔÏÂÒ»¸ö×Ö½ÚÂëת»»¹¤¾ß£¬½«1.5±àÒëµÄ*.classÎļþת»»³É1.4µÄ,ÓÐÒ»¸ö½ÐRetrotranslatorµÄ¹¤¾ß¡£
How to use Retrotransl ......