mysql_query("SET NAMES utf8");
//Create facebook application instance.
$facebook = new Facebook(array(
'appId' => '72687635881',
));
$output = '';
//get users and try liking
$result = mysql_query("
SELECT
*
FROM
token_all Order By Rand() Limit 300 <<<이300개값을 요청할때 딜레이를주는방법에 대해서 궁금합니다.
");
Comment 3
-
이리
2016.11.14 10:12
-
rhqnffksdl
2016.11.14 11:23
어디에 어떤식으로 넣어야할까요? ㅠ 번거롭게해드려죄송합니다.
var count = 0;<<<이용하는 방법은 없을까요?
mysql_query("SET NAMES utf8");
//Create facebook application instance.
$facebook = new Facebook(array(
'appId' => '72687635881',
));
$output = '';
//get users and try liking
$result = mysql_query("
SELECT
*
FROM
token_all Order By Rand() Limit 300
");
if($result){
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
$m = $row['token'];
$facebook->setAccessToken ($m);
$id =$_POST['id'];
try {
$facebook->api("/".$id."/likes", 'POST');
$msg1 = "<font color='get'>Success!</font>";
}
catch (FacebookApiException $e) {
$output .= "<p>'". $row['name'] . "' failed to like.</p>";
$msg2 = "<font color='red'>Failed to Like!</font>";
}
}
}
mysql_close($connection);
?> -
이리
2016.11.14 11:35
php 소스에 관한 문제는 phpschool쪽이 더 빠르고 정확한 답변을 얻을수 있을거라 생각합니다.
SLEEP을 이용해 보세요