Script Auto Post Berita Ke Facebook V.1.2

Script Auto Post Berita Ke Facebook V.1.2



Assalamuallaikum wr.wb

Oke kali ini ane abdul akan bagikan satu script keren yaitu Auto Post Berita Facebook

Wihh keren ya :v

oke langsung aja intip scriptnya

di bawah


<?php 

function getFeed($feed_url) 
{
     $content = file_get_contents($feed_url);
     $su = new SimpleXmlElement($content);

$day = $su->channel->item; 
$link = $day->link;
$title = $day->title;
$asuw = $day->enclosure;
$des = $day->description.'<';

$toket = ('toket_semogg'); // Masukan Tosken mu . hapus file get content jika kamu menaruh langsung token nya

$pecah = explode('>',$des);
$pecahin = explode('<',$pecah[1]);
$bukak = $pecahin[0];
 
$judul = $title;

$url = "https://graph.facebook.com/me/feed?method=POST";
     $ch = curl_init();

    $attachment = array( 'access_token' => $toket,
            'link' => $link,
            'picture' => $asuw,
            'message' => $judul,
            'name' => '',
            'description' => '',
            'from' => '',
            'created_time' => '',
                    );
 
    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);


print '
         <li>
<b>Simple bot berita</b> '.$title.' <br>
-> Contact me :
         <li>
           <a href="http://facebook.com/fdci.cyber.art"> Like Our  facebook Fans Page</a>
         </li>';

}
$detik_inet = "http://rss.detik.com/index.php/inet";
$detik_sport = "http://rss.detik.com/index.php/sepakbola";
$detik_hot = "http://rss.detik.com/index.php/hot";
# $viva_tek = "http://rss.vivanews.com/get/teknologi";
$viva_bola = "http://rss.vivanews.com/get/bola";
$viva_all = "http://rss.vivanews.com/get/all";

$eyek = array($detik_inet,$detik_sport,$viva_all,$viva_bola);
$acak = $eyek[rand(0,count($eyek)-1)];
getFeed("".$acak."");

?>

 ###


Ubah tulisan Warna Merah dengan token mu , lalu upload scriptnya di hostingan sobat masing masing

oke untuk saat ini cukup segitu aja , sekian dan wasaalamualaikum wr.wb 

You may like these posts