Ç¿´óµÄ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Óï¾äËù·µ»ØµÄ½á¹û¼¯¡£¸Ãº¯ÊýµÄÓï·¨¸ñʽÈçÏ´úÂ룺 ......
Ò»¡¢
1.¼ì²éĿ¼»òÎļþµÄȨÏÞ
2.Ð޸ĻòÌí¼ÓÅäÖÃÎļþ
3.¼ì²éÅäÖÃÎļþµÄÕýÈ·ÐÔ
4.µ¼ÈëÊý¾Ý¿â
5.Ëø¶¨»òɾ³ý°²×°Îļþ
ÔÀí£º
Æäʵphp³ÌÐòµÄ°²×°ÔÀí¾ÍÊǽ«Êý¾Ý¿â½á¹¹ÄÚÈݵ¼Èëµ½ÏàÓ¦µÄÊý¾Ý¿âÖУ¬´ÓÕâ¸ö¹ý³ÌÖÐÖØÐ·ÖÅäÁ¬½ÓÊý¾Ý¿âµÄ²ÎÊýºÍÎļþ£¬ÎªÁ˱£Ö¤²»±»±ðÈ˶ñÒâÓð²×°Îļþ£¬µ±°²×°Íê³ÉºóÐèÒªÐ޸ݲװÎļþ¡£
¶þ¡¢ÖÆ×÷° ......
phpMyAdminÌáʾû×Ö·û´®±àÂëºÍ×Ö·û´®´¦Àí¿âphp_mbstring
SSHÁ¬½ÓÉϺó£ºyum install php-mbstring°²×°À©Õ¹
vi usr/local/lxlabs/ext/php/etc/php.ini±à¼PHP.iniÎļþ
È¥µôÒ»ÐеÄ×¢ÊÍ£ºextension=mbstring.so
(ÓÐЩ¿ÉÒÔ²»ÓÃÉèÖÃÕâÁ½ÐУ¬php.iniÖв»´æÔÚ£»extension=mbstring.so
£¬
Ö»ÒªmbStringÀ©Õ¹°²×°µ½ÁËextension ......
$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 ......
ÔÚPHPÖУ¬ÎļþÉÏ´«Ò»°ãÊÇͨ¹ýmove_uploaded_file£¨£©À´ÊµÏֵġ£
bool move_uploaded_file ( string filename, string destination )±¾º¯Êý¼ì²é²¢È·±£ÓÉ filename Ö¸¶¨µÄÎļþÊǺϷ¨µÄÉÏ´«Îļþ£¨¼´Í¨¹ý PHP µÄ HTTP POST ÉÏ´«»úÖÆËùÉÏ´«µÄ£©¡£Èç¹ûÎļþºÏ·¨£¬Ôò½«ÆäÒÆ¶¯ÎªÓÉ destination Ö¸¶¨µÄÎļþ¡£
Èç¹û filename ²»ÊǺϷ ......