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

php ÊÖ»úÏÂÔØ POST Àà

ÓÉÓÚ×î½üÔÚÓëSPºÏ×÷,¿ª·¢ÊÖ»úÒµÎñÏÂÔØ,Êý¾ÝÌá½»²ÉÓÃPOST·½Ê½Ìá½»,ÏÖÓë´ó¼Ò·Öºà±È½Ï³ÉÊìÀà.
function uc_api_post($url, $action, $sendmsg='') {
$postdata = "corpMsg=$sendmsg";
return uc_fopen(UC_URL, 500000, $postdata, '', TRUE, UC_IP, 20);
}
function uc_fopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $ip = '', $timeout = 15, $block = TRUE) {
$return = '';
$matches = parse_url($url);
!isset($matches['host']) && $matches['host'] = '';
!isset($matches['path']) && $matches['path'] = '';
!isset($matches['query']) && $matches['query'] = '';
!isset($matches['port']) && $matches['port'] = '';
$host = $matches['host'];
$path = $matches['path'] ? $matches['path'].($matches['query'] ? '?'.$matches['query'] : '') : '/';
$port = !empty($matches['port']) ? $matches['port'] : 80;
if($post) {
$out = "POST $path HTTP/1.0\r\n";
$out .= "Accept: */*\r\n";
//$out .= "Referer: $boardurl\r\n";
$out .= "Accept-Language: zh-cn\r\n";
$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
$out .= "User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n";
$out .= "Host: $host\r\n";
$out .= 'Content-Length: '.strlen($post)."\r\n";
$out .= "Connection: Close\r\n";
$out .= "Cache-Control: no-cache\r\n";
$out .= "Cookie: $cookie\r\n\r\n";
$out .= $post;
} else {
$out = "GET $path HTTP/1.0\r\n";
$out .= "Accept: */*\r\n";
//$out .= "Referer: $boardurl\r\n";
$out .= "Accept-Language: zh-cn\r\n";
$out .= "User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n";
$out .= "Host: $host\r\n";
$out .= "Connection: Close\r\n";
$out .= "Cookie: $cookie\r\n\r\n";
}
$fp = @fsockopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout);
if(!$fp) {
return '';
} else {
stream_set_blocking($fp, $block);
stream_set_timeout($fp, $timeout);
@fwrite($fp, $out);
$status = stream_get_meta_data($fp);
if(!$status['timed_out']) {
while (!feof($fp)) {
if(($header = @fgets(


Ïà¹ØÎĵµ£º

PHP»ù´¡Ñ§Ï°±Ê¼ÇÖ®»ù±¾Óï·¨

   php»ù´¡Ñ§Ï°ÒѾ­²î²»¶àÁË,µ«ÊÇΪ¼ìÑé×Ô¼ºµÄѧϰÕÆÎÕÇé¿ö,°Ñphp»ù´¡ÖªÊ¶»Ø¹Ë¸´Ï°ÁËÒ»ÏÂ
µÚÒ»¸öPHP³ÌÐò
<?php
echo "Hello World!";
?>
1 ×¢ÊÍ
1.1¶àÐÐ
/*
xxxx
*/
1.2µ¥ÐÐ
//xxxxx
2. ¸³Öµ
$a = 'test';
2.1 ¼ì²é±äÁ¿ÊÇ·ñÒÑÉùÃ÷
isset($a)
2.2 ÊͷűäÁ¿
unset($a);
2.3 ¾² ......

php jquery ÉÏ´«ÕÕƬ,ÉÏ´«ºóʵʱ±¾Ò³ÃæÔ¤ÀÀ

ÆäʵÕâ¸öµÄÖ÷Òª²¿·Ö²¢²»ÊÇÒ»¸öjquery£¬µ«ÊDZØÐëʹÓõ½
php³ÌÐò²¿·Ö£¬Ò²Ö»ÐèÒªÕâ¸öÒ»¸öphp³ÌÐò¾Í¿ÉÒÔÁË
www.corange.cnÇײâ
<?php
header("Content-Type: text/html; charset=utf-8");
@header( "Cache-Control: no-cache, must-revalidate" );
@header( "Pragma: no-cache" );
@header( "Last-Modified: " ......

PHPÃæÏò¶ÔÏó·ÖÎöÉè¼ÆµÄ61Ìõ¾ü¹æ

PHPÃæÏò¶ÔÏó·ÖÎöÉè¼ÆµÄ61Ìõ¾ü¹æ
Äã²»±ØÑϸñ×ñÊØÕâЩԭÔò£¬Î¥±³ËüÃÇÒ²²»»á±»´¦ÒÔ×Ú½ÌÐÌ·£¡£µ«ÄãÓ¦µ±°ÑÕâЩԭÔò¿´³É¾¯Á壬ÈôÎ¥±³ÁËÆäÖеÄÒ»Ìõ£¬ÄÇô¾¯Áå¾Í»áÏìÆð ¡£ ----- Arthur J.Riel
(1)ËùÓÐÊý¾Ý¶¼Ó¦¸ÃÒþ²ØÔÚËùÔÚµÄÀàµÄÄÚ²¿¡£
(2)ÀàµÄʹÓÃÕß±ØÐëÒÀÀµÀàµÄ¹²Óнӿڣ¬µ«À಻ÄÜÒÀÀµËüµÄʹÓÃÕß¡£
(3)¾¡Á¿¼õÉÙÀàµÄЭÒéÖÐ ......

ÔÚ PHP ÖÐÑø³É 7 ¸öÃæÏò¶ÔÏóµÄºÃÏ°¹ß

2008 Äê 11 ÔÂ 17 ÈÕ
Èç¹ûÄúÉÐδ´òËãÓà OO Ô­Ôò´´½¨Ó¦ÓóÌÐò£¬ÔòʹÓà PHP µÄÃæÏò¶ÔÏó£¨OO£©µÄÓïÑÔÌØÐÔ£¬Õâ 7 ¸öÏ°¹ß½«°ïÖúÄú¿ªÊ¼ÔÚ¹ý³Ì±à³ÌÓë OO ±à³ÌÖ®¼ä½øÐÐת»»¡£
ÔÚ PHP ±à³ÌÔçÆÚ£¬PHP ´úÂëÔÚ±¾ÖÊÉÏÊÇÏÞÓÚÃæÏò¹ý³ÌµÄ¡£¹ý³Ì´úÂë µÄÌØÕ÷ÔÚÓÚʹÓùý³Ì¹¹½¨Ó¦ÓóÌÐò¿é¡£¹ý³Ìͨ¹ýÔÊÐí¹ý³ÌÖ®¼äµÄµ÷ÓÃÌṩijÖ̶ֳȵÄÖØÓá£
µ ......

PHP ʵÏÖ¶à·þÎñÆ÷¹²ÏíSESSIONÊý¾Ý

Ò»¡¢ÎÊÌâÆðÔ´
ÉÔ´óһЩµÄÍøÕ¾£¬Í¨³£¶¼»áÓкü¸¸ö·þÎñÆ÷£¬Ã¿¸ö·þÎñÆ÷ÔËÐÐ×Ų»Í¬¹¦ÄܵÄÄ£¿é£¬Ê¹Óò»Í¬µÄ¶þ¼¶ÓòÃû£¬¶øÒ»¸öÕûÌåÐÔÇ¿µÄÍøÕ¾£¬Óû§ÏµÍ³ÊÇͳһµÄ£¬¼´Ò»Ì×
Óû§Ãû¡¢ÃÜÂëÔÚÕû¸öÍøÕ¾µÄ¸÷¸öÄ£¿éÖж¼ÊÇ¿ÉÒԵǼʹÓõġ£¸÷¸ö·þÎñÆ÷¹²ÏíÓû§Êý¾ÝÊDZȽÏÈÝÒ×ʵÏֵģ¬Ö»ÐèÒªÔÚºó¶Ë·Å¸öÊý¾Ý¿â·þÎñÆ÷£¬¸÷¸ö·þÎñÆ÷ͨ¹ýͳһ½Ó
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ