<?php for ($i=1;$i<1066;$i++) { $i = str_pad($i,4,"0",STR_PAD_LEFT); $datas = file_get_contents("$i".'.txt'); $numb = file_put_contents('urls.txt', $datas); $res = exec("curl -H 'Content-Type:text/plain' --data-binary @urls.txt "http://data.zz.baidu.com/urls?appid=1616093799769168&token=kvFwHOWtNYNKRl0U&type=batch""); var_dump($res); }