//curl_multi_init()
session_start();
$url = 'http://localhost.huawei.com:8060/ecommunity/index.php?app=admin&mod =DataMove&act=moveData_share';
$ch = 컬_init();
curl_setopt($ch, CURLOPT_URL, $url); <… 컬_setopt($ch, CURLOPT_TIMEOUT,43200);
$dxycontent = 컬_exec($ch);
curl_close($ch);
echo $dxycontent;
?>
$url){ $conn[$key] = 컬_init(); 컬_setopt($conn[$key], CURLOPT_URL, $url); cur_setopt($conn[$key], CURLOPT_USERAGENT, 'Mozilla/4.0(호환; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)'); 컬_setopt($conn[$key], CURLOPT_RETURNTRANSFER, 1); 컬_setopt($conn[$key], CURLOPT_TIMEOUT,43200); cur_multi_add_handle($mh,$conn[$key]); } $running=null; // 执行批处理句柄 do { //usleep(10000); cur_multi_exec($mh,$running); } while ($running > 0 ); $결과 = 배열(); foreach($conn as $ckey => $cvalue){ curl_close ($conn[$ckey]); //关闭语柄 $results[$ckey] =curl_multi_getcontent($conn[$ckey]); curl_multi_remove_handle ( $mh, $conn[$ckey] ); //释放资源
} curl_multi_close($mh); print_r($결과); ?>
박쥐 사용
@echo off
echo "시작................................."
d: xampphtdocstrial
php moveUser_1.php
일시 중지