Ç¿´óµÄ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
Ïà¹ØÎĵµ£º
1¡¢Apache
¡¡¡¡ÔÚÈçÏÂÒ³ÃæÏÂÔØapacheµÄfor Linux µÄÔ´Âë°ü
¡¡¡¡http://www.apache.org/dist/httpd/;
¡¡¡¡´æÖÁ/home/xxĿ¼£¬xxÊÇ×Ô½¨Îļþ¼Ð£¬ÎÒ½¨ÁËÒ»¸öwjµÄÎļþ¼Ð¡£
¡¡¡¡ÃüÁîÁÐ±í£º
¡¡¡¡
cd /home/wj
¡¡¡¡tar -zxvf httpd-2.0.54.tar.gz
¡¡¡¡mv httpd-2.0.54 apache
¡¡¡¡cd apache
¡¡¡¡./configure --prefix=/u ......
Ò»¡¢
1.¼ì²éĿ¼»òÎļþµÄȨÏÞ
2.Ð޸ĻòÌí¼ÓÅäÖÃÎļþ
3.¼ì²éÅäÖÃÎļþµÄÕýÈ·ÐÔ
4.µ¼ÈëÊý¾Ý¿â
5.Ëø¶¨»òɾ³ý°²×°Îļþ
ÔÀí£º
Æäʵphp³ÌÐòµÄ°²×°ÔÀí¾ÍÊǽ«Êý¾Ý¿â½á¹¹ÄÚÈݵ¼Èëµ½ÏàÓ¦µÄÊý¾Ý¿âÖУ¬´ÓÕâ¸ö¹ý³ÌÖÐÖØÐ·ÖÅäÁ¬½ÓÊý¾Ý¿âµÄ²ÎÊýºÍÎļþ£¬ÎªÁ˱£Ö¤²»±»±ðÈ˶ñÒâÓð²×°Îļþ£¬µ±°²×°Íê³ÉºóÐèÒªÐ޸ݲװÎļþ¡£
¶þ¡¢ÖÆ×÷° ......
$doc = new DOMDocument('1.0', 'UTF-8');
$doc->formatOutput = true;
$root = $doc->createElement('document'); //´´½¨¸ù
$doc->appendChild($root); //¼ÓÈë¸ù
//webSite
$webSite = $doc->createElement('webSite');
$webSite->appendchild($doc ......
ÓÐÕâôһ¶ÎHTML£¬±È½Ï²»¹æÔòµÄ£¬Èç¹ûÒªÌáÈ¡ÆäÖеÄÁ´½ÓµØÖ·ºÍÁ´½ÓÃû³Æ£¬ÔõôŪ£¿ ÄÚÈÝÀ´×Ôdedecms
//HTML
$str = '<a id="top8" href="http://list.mp3.baidu.com/song/A.htm?top8" class="p14" target="_top">¸èÇúÁбí</a><br><a target="_blank" id="bp" href="http://list.mp3.baidu.com/list/ba ......
ÔÚPHPÖУ¬ÎļþÉÏ´«Ò»°ãÊÇͨ¹ýmove_uploaded_file£¨£©À´ÊµÏֵġ£
bool move_uploaded_file ( string filename, string destination )±¾º¯Êý¼ì²é²¢È·±£ÓÉ filename Ö¸¶¨µÄÎļþÊǺϷ¨µÄÉÏ´«Îļþ£¨¼´Í¨¹ý PHP µÄ HTTP POST ÉÏ´«»úÖÆËùÉÏ´«µÄ£©¡£Èç¹ûÎļþºÏ·¨£¬Ôò½«ÆäÒÆ¶¯ÎªÓÉ destination Ö¸¶¨µÄÎļþ¡£
Èç¹û filename ²»ÊǺϷ ......