PHPÖвÉÓÃPOST·½Ê½·¢ËÍÊý¾Ý
×î½üÁ½ÌìÏîÄ¿ÐèÒª£¬ÓÉÓÚ·þÎñÆ÷ÕýÔÚ¿ª·¢£¬¿Í»§¶Ë½ø¶ÈÉÔ¿ìһЩ£¬Ã»ÓзþÎñÆ÷½øÐÐÁªµ÷¡£Òò´ËÎÒÖزپÉÒµ£¬ÓÃPHP¿ìËÙµÄдÁËһЩwebÒ³Ã棬ËãÊǵ±²âÊÔ×®³ÌÐòÁË£¬Æ߰˸öweb½Ó¿Ú£¬»ù±¾ÉÏ5µ½6¸öСʱ¸ã¶¨ÁË¡£ÓÉÓÚµ±Ç°µÄ·þÎñÆ÷ÐèÒªÓëÆäËû·þÎñÆ÷½øÐжԽӣ¬Òò´ËдµÄÕâ¸öweb·þÎñ»¹ÐèÒª³äµ±client½ÇÉ«£¬ÏòÆäËû·þÎñÆ÷·¢ËÍÇëÇó¡£
ÔÚÍøÉÏËÑÁËһϣ¬»ù±¾ÉÏÁ½ÖÖ·½·¨£º£¨×ª×ÔÍøÓÑÎÄÕ£©
1.ͨ¹ýcurlº¯Êý
$post_data
=
array
()
;
$post_data
[
'
clientname
'
]
=
"
test08
"
;
$post_data
[
'
clientpasswd
'
]
=
"
test08
"
;
$post_data
[
'
submit
'
]
=
"
submit
"
;
$url
=
'
http://xxx.xxx.xxx.xx/xx/xxx/top.php
'
;
$o
=
""
;
foreach
(
$post_data
as
$k
=>
$v
)
{
$o
.=
"
$k
=
"
.
urlencode
(
$v
)
.
"
&
"
;
}
$post_data
=
substr
(
$o
,
0
,-
1
)
;
$ch
=
curl_init
()
;
curl_setopt
(
$ch
,
CURLOPT_POST
,
1
)
;
curl_setopt
(
$ch
,
CURLOPT_HEADER
,
0
)
;
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
)
;
//ΪÁËÖ§³Öcookie
curl_setopt
(
$ch
,
CURLOPT_COOKIEJAR
,
'
cookie.txt
'
)
;
curl_setopt
(
$ch
,
CURLOPT_POSTFIELDS
,
$post_data
)
;
$result
=
curl_exec
(
$ch
)
;
2. ͨ¹ýfsockopen
$URL
=‘
http
:
//xxx.xxx.xxx.xx/xx/xxx/top.php';
$post_data
[
'
clientname
'
]
=
"
test08
"
;
$post_data
[
'
clientpasswd
'
]
=
"
test08
"
;
$post_data
[
'
submit
'
]
=
"
¥í¥°¥¤¥ó
"
;
$referrer
=
""
;
// parsing the given URL
$URL_Info
=
parse_url
(
$URL
)
;
// Building referrer
if
(
$referrer
==
""
)
// if not given use this script as referrer
$referrer
=
$_SERVER
[
"
SCRIPT_URI
"
]
;
// making string from $data
foreach
(
$post_data
as
$key
=>
$value
)
$values
[]
=
"
$key
=
"
.
urlencode
(
$value
)
;
$data_stri
Ïà¹ØÎĵµ£º
TIOBEÊÀ½ç±à³ÌÓïÑÔÅÅÐаñÕ¹ÏÖÁ˱à³ÌÓïÑÔµÄÁ÷ÐÐÇ÷ÊÆ¡£Ã¿¸öÔ£¬¶¼ÓÐ×îеÄÊý¾Ý±»¸üС£Õâ·ÝÅÅÐаñµÄÊý¾ÝÈ¡ÑùÀ´Ô´ÓÚ»¥ÁªÍøÉϸ»ÓоÑéµÄ³ÌÐòÔ±¡¢ÉÌ ÒµÓ¦Óá¢ÖøÃûµÄËÑË÷ÒýÇ棨ÖîÈç¹È¸è¡¢ MSN ¡¢ÑÅ»¢£©µÄ¹Ø¼ü×ÖÅÅÃû¡¢ Alexa ÉϵÄÅÅÃûµÈ¡£Çë×¢ÒâÕâ¸öÅÅÐаñÖ»ÊÇ·´Ó³ÁËij¸ö±à³ÌÓïÑÔµÄÈÈÃÅ³Ì¶È , Õâ²¢²»´ú±íËüÊÇÒ»¸ö×îºÃµÄ±à³ÌÓïÑÔ» ......
Ò»¸ö¼òµ¥µÄÀý×Ó¶ÁÈ¡CSVÎļþ£º
<?php
$handle=fopen("test.csv","r");
echo "<table border=2>";
//ÅäºÏwhileÑ»·¶ÁÈ¡Îļþ
while($data=fgetcsv($handle,1024))
{
list($user,$pwd,$partment,$title)=$data;
echo "<tr>
<td>$user</td>
<td>$pwd< ......
ÓÅÐãµÄPHP´úÂëÓ¦¸ÃÊǽṹ»¯µÄ¡£´ó¶ÎµÄ´úÂëÓ¦¸Ã±»·Ö¸îÕûÀí³ÉÒ»¸ö¸öº¯Êý»ò·½·¨£¬¶øÄÇЩ²»ÆðÑÛµÄС¶Î´úÂëÔòÓ¦¸Ã¼ÓÉÏ×¢ÊÍ£¬ÒÔ±ãÈÕºóÇå³þËüÃǵÄÓÃ;¡£
¶øÇÒÓ¦¸Ã¾¡¿ÉÄܵذÑǰ̨´úÂëÈçHTML¡¢CSS¡¢JavascriptµÈ´Ó³ÌÐòÖзÖÀë³öÀ´¡£PHPµÄÃæÏò¶ÔÏó±à³ÌÌØÐÔ¿ÉÒԺܺõذïÖú³ÌÐòÔ±½«´úÂëÕûÀíÓÐ
Ðò¡£
&n ......
phpÁ¬½Óaccess
$conn=new COM("ADODB.Connection");
$dsn="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=".realpath("data.mdb").";Uid=Admin; Pwd=BDC2002Data;";
$conn->open($dsn);
$sql="select * from dict";
$rs=$conn->Execute($sql);
$row="0";
while(!$rs->EO ......
ÈçºÎÔÚPHPÏÂÔØÎļþÃûÖнâ¾öÂÒÂë
CND8ѧԺ
¡¡PHP½Ì³Ì
¡¡·¢²¼ÈÕÆÚ£º2009Äê05ÔÂ23ÈÕ
ͨ¹ý°ÑContent-TypeÉèÖÃΪapplication/octet-stream£¬¿ÉÒ԰Ѷ¯Ì¬Éú³ÉµÄÄÚÈݵ±×÷ÎļþÀ´ÏÂÔØ£¬ÏàÐÅÕâ¸ö´ó¼Ò¶¼»á¡£ÄÇôÓÃContent-DispositionÉèÖÃÏÂÔصÄÎļþÃû£¬Õâ¸öÒ²Óв»ÉÙÈËÖªµÀ°É¡£»ù±¾ÉÏ£¬ÏÂÔسÌÐò¶¼ÊÇÕâôдµÄ£º
< ......