Ç¿´óµÄ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) Ö´ÐÐÒÔÏÂSQLÓï¾ä£º
select field1,field2,field3,...from $table_name
ÆäÖÐfield1,field2,field3±íʾµÄÊÇÐèÒª´Ó±íÖвéѯµÄ×Ö¶ÎÃû³Æ£º$table_nameΪ±íµÄÃû³Æ¡£
(2)ʹÓÃPHP MSSQLÀà¿âÖеÄmssql_fetch_array()º¯Êý¶ÁȡִÐÐSQLÓï¾äËù·µ»ØµÄ½á¹û¼¯¡£¸Ãº¯ÊýµÄÓï·¨¸ñʽÈçÏ´úÂ룺 ......
http://linux.chinaitlab.com/administer/774036.html
[ ÆðÔ´ ]Linux/UnixÏÂÊØ»¤½ø³Ì£¨Daemon£©´ó¼Ò¶¼ÖªµÀ£¬±ÈÈçÎÒÃdz£ÓõÄhttpd¡¢mysqldµÈµÈ£¬¾ÍÊdz£×¤ÄÚ´æÔËÐеijÌÐò£¬ÀàËÆÓÚWindowsϵķþÎñ¡£Ò»°ãÊØ»¤½ø³Ì¶¼ÊÇʹÓÃC/C++À´Ð´£¬¾ÍÊÇͨ¹ýforkÉú³É×Ó½ø³Ì£¬µ±Ç°Ì¨shellϵĸ¸½ø³Ì±»É±µô£¬×Ó½ø³Ì¾Íתµ½ºǫ́ÔËÐУ¬ÎªÁ˲» ......
¸Õ»»ÁËÒ»¸ö¹¤×÷£¬ÏÖÔÚûʲôÊÂ×ö£¬Ð´ÁËÒ»¸öÊý¾Ý»º´æµÄÀà¡£
¿ÉÒÔ»º´æÊý×飬×Ö·û£¬¶ÔÏóµÈ£¬Ö´ÐÐЧÂÊ»¹Ã»ÓвâÊÔ£¬ÏȷųöÀ´°É¡£
ʵÀýÈçÏ£º
* @example
* require 'MyCache.class.php';
* $mc = new MyCache("./test/cache");
* $a = "hello world111";
* $mc->set("ss", $a);
......
ÔÚPHPÖУ¬ÎļþÉÏ´«Ò»°ãÊÇͨ¹ýmove_uploaded_file£¨£©À´ÊµÏֵġ£
bool move_uploaded_file ( string filename, string destination )±¾º¯Êý¼ì²é²¢È·±£ÓÉ filename Ö¸¶¨µÄÎļþÊǺϷ¨µÄÉÏ´«Îļþ£¨¼´Í¨¹ý PHP µÄ HTTP POST ÉÏ´«»úÖÆËùÉÏ´«µÄ£©¡£Èç¹ûÎļþºÏ·¨£¬Ôò½«ÆäÒÆ¶¯ÎªÓÉ destination Ö¸¶¨µÄÎļþ¡£
Èç¹û filename ²»ÊǺϷ ......