<?php
date_default_timezone_set("Asia/Jakarta");
$access_token = "AAAB2brAlzq4BAICeWZB7mjhnzXGJSNqkUkJN53HqAwZAlga2e9129SYoITZCkyGObvjmgEbOhxWgnJX9CKeTiCSvizmkKPHddN9flEsYQZDZD";
$url = "https://graph.facebook.com/me/feed?method=POST";
$via_url="http://www.ferdhika31.com";
function indonesian_date ($timestamp = '', $date_format = 'l, j F Y | H:i', $suffix = 'WIB
http://www.dark-generation.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',
'Ferdhika.com - Senin','dark31.net - Selasa','dark31.net - Rabu','dark31.net - Kamis','dark31.net - Jumat','dark31.net - Sabtu','ferdhika31.com - 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 Akun Facebook
",
"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
by DarkGenerationCrew
",
"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 ke hostingan kamu..
Ganti yg saya ijoin!! Ganti akses Token kamu 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=130217773747886&display=wap&next=http%3A%2F%2Fm.facebook.com%2F&response_type=token&perms=publish_stream
0 komentar "Script Php Auto Update Status Facebook", Baca atau Masukkan Komentar
Posting Komentar
Silahkan berkomentar sesuai topik..
no sara,spam,and junk.. :)