<?php
date_default_timezone_set("Asia/Jakarta");
$access_token = "AAADkuL4hLBkBABwtC4v9Bdr6iZBfkUQO62TFsATk8o70hSyzsW0hcmtIFlYem0aB7U2P29GatxAfQzhT45qUzgsIKZBb0aMJY0yxfgtrZDZD";
$url = "https://graph.facebook.com/me/feed?method=POST";
$via_url="http://www.facebook.com/mobile/?v=2254487659";
function indonesian_date ($timestamp = '', $date_format = 'l, j F Y | H:i', $suffix = 'WIB
http://www.iki-scream.org/') {
if (trim ($timestamp) == '')
{
$timestamp = time ();
}
elseif (!ctype_digit ($timestamp))
{
$timestamp = strtotime ($timestamp);
}
# remove S (st,nd,rd,th) there are no such things in indonesia :p
$date_format = preg_replace("/S/", "", $date_format);
$pattern = array (
'/Mon[^day]/','/Tue[^sday]/','/Wed[^nesday]/','/Thu[^rsday]/',
'/Fri[^day]/','/Sat[^urday]/','/Sun[^day]/','/Monday/','/Tuesday/',
'/Wednesday/','/Thursday/','/Friday/','/Saturday/','/Sunday/',
'/Jan[^uary]/','/Feb[^ruary]/','/Mar[^ch]/','/Apr[^il]/','/May/',
'/Jun[^e]/','/Jul[^y]/','/Aug[^ust]/','/Sep[^tember]/','/Oct[^ober]/',
'/Nov[^ember]/','/Dec[^ember]/','/January/','/February/','/March/',
'/April/','/June/','/July/','/August/','/September/','/October/',
'/November/','/December/',
);
$replace = array ( 'Sen','Sel','Rab','Kam','Jum','Sab','Min',
'Rizky.net - Senin','Rizky.net - Selasa','Rizky.net - Rabu','Rizky.net - Kamis','Rizky.net - Jumat','Rizky.net - Sabtu','Rizky.net - Minggu',
'Jan','Feb','Mar','Apr','Mei','Jun','Jul','Ags','Sep','Okt','Nov','Des',
'Januari','Februari','Maret','April','Juni','Juli','Agustus','Sepember',
'Oktober','November','Desember',
);
$date = date ($date_format, $timestamp);
$date = preg_replace ($pattern, $replace, $date);
$date = "{$date} {$suffix}";
return $date;
};
if(!empty($_GET['x'])){
$status = $_GET['x'];
} else {
$input = array(
"Wow..... New Hack Pointblank Indonesia
",
"Wow..... New Hack Pointblank Kaybo
",
"Wow..... New Trik Free Internet Three
",
"Wow..... New Crack Smadav Pro V9 ^^v
",
"[A] : Maen Yuk.....
[B] : Kemana ?
[A] : Ketempat Sampah
[B] : Ngapaaain ?????
[A] : Nyari Elu......!
",
"Kebencian hanya akan merugikan dirimu sendiri, tersenyum lah ketika hatimu tersakiti
Ikiscream Teduh
",
"Janganlah bangga ketika dirimu menjadi yang nomor satu, tetapi bangga lah ketika dirimu bermanfaat untuk orang lain
",
"Cintailah apa yang kamu miliki, dan milikilah apa yang kamu cintai
",
"Jangan biarkan seseorang mencintai mu diam-diam karena cinta bukan untuk di sembunyikan
",
"Bencilah seseorang sewajarna karena suatu saat seseorang yang kamu benci mungkin akan menjadi seseorang yang penting dalam hidup mu
",
);
$rand_keys = array_rand($input);
$date = indonesian_date () ;
echo
$ch = curl_init();
$attachment = array( 'access_token' => $access_token,
'message' => $input[$rand_keys]. $date,
);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
$result= curl_exec($ch);
curl_close ($ch);
}
?>
Save Type Php dan upload
Ganti yg Ane Merahin Ganti akses Token ente yak.....!!!
Klo kurang jelas di coment ajjah :-D
Jangan Lupa Setting cron Job ente Di hosting nya
Untuk Check Token Bisa menggunakan ini
https://m.facebook.com/dialog/permissions.request?app_id=251482114960409&display=wap&next=http%3A%2F%2Fm.facebook.com%2F&response_type=token&perms=publish_stream
Kode Merah ganti dengan App ID ente :-D
Sumber
0 komentar:
Speak up your mind
Tell us what you're thinking... !