php异步处理方式
test.php
<?php


$domain = "localhost";
$url = '/platform_php_sdk/test4.php';
$header = "POST $url HTTP/1.0\r\n";
$header .= "Content-Type:application/x-www-form-urlencoded\r\n";

$par = "email=zhangzenglun@163.com";

$header .="Content-Length:".strlen($par)."\r\n\r\n";
$fp = @fsockopen($domain,80,$errno,$errstr,30);
fputs($fp, $header.$par);
fclose($fp);

echo 'send ok!';

?>

test4.php

<?php

set_time_limit ( 0 );
ignore_user_abort ( true );
$i = 0;
while ( $i ++ < 50 ) {
file_put_contents ( $i . '.php', $_REQUEST['email'].$i);
sleep ( 3 );
}

?>
lunzi   2012-04-28 19:22:18 评论:0   阅读:1052   引用:0

发表评论>>

署名发表(评论可管理,不必输入下面的姓名)

姓名:

主题:

内容: 最少15个,最长1000个字符

验证码: (如不清楚,请刷新)

Copyright@2004-2010 powered by YuLog