1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

Auto Generated Link From Bing

Discussion in 'Pemrograman Web' started by prafangga, Jan 18, 2011.

  1. prafangga

    prafangga Super Hero

    Joined:
    Jan 18, 2010
    Messages:
    1,821
    Likes Received:
    237
    Location:
    Indonesia
    Auto Generated Link From Bing, au ah apa namanya, Bisa di tambahkan sebagai pendongkrak yang demen main ABC. baik AGC search atau AGC 404. intinya script ini buat menampilkan link dengan mengambil title posting sebagai source trus di cari di bing feed artikel yg bersangkutan dengan source yang outputnya link (bisa kita arahkan ke page 404 / search page) terserah kebutuhan. kalo normalnya auto link generated berasal dari link tangkapan STT2.

    dibawah ini link outputnya tak arahken ke page 404 buat tujuan AGC 404. Saya ndak mbahas AGC 404 disini, silahkan cari sendiri.

    PHP:
    <?php $edit = array ('-' '/' '.html');
    $sumber str_replace($edit' '$_SERVER['REQUEST_URI']);
    ?>

    <?php
    // Get RSS Feed(s)
    include_once(ABSPATH WPINC '/feed.php');

    $query $sumber ;
    $rss fetch_feed('http://www.bing.com/search?q=' str_replace(' ''+'$query) . '&go=&form=QBLH&filt=all&format=rss');

    if (!
    is_wp_error$rss ) ) : // Checks that the object is created correctly
    // Figure out how many total items there are, but limit it to 10.
    $maxitems $rss->get_item_quantity(5);

    // Build an array of all the items, starting with element 0 (first element).
    $rss_items $rss->get_items(0$maxitems);
    endif;

    ?>



    <?php if ($maxitems == 0)
    echo 
    ' ';
    else

    // Loop through each feed item and display each item as a hyperlink.
    foreach ( $rss_items as $item ) : ?>

    <center>
    <?php 

    $erase 
    = array (';' '%' '+' '-' '&'':' 'amp;' ' ...' ' ....' ' .....' '–' '|' '[' '[' '?' '$' ','  '.' '«' '(' ')''::');
    $first str_replace ($erase '' $item->get_title());
    $encode urlencode(strtolower($first));
    $plus str_replace ('+' '-' $encode);
    $minus = array ('--' '---' '----');
    $link str_replace ($minus '-' $plus);
    ?>

    <a href=<?php echo $link?>.html><?php echo $item->get_title(); ?></a>

    </center>
    <?php endforeach; ?>
    :-B maap sederhana dan acak adul masih cupu soalnya, siapin AGC 404 trus taruh script diatas letakan di footer atau sidebar (Php widget). biar ndak terlalu melebar cukup tampilin jika posisi ada di single post

    PHP:
    <?php if (is_single()) {?>

     Insert your code...

    <?php }?>
    AGC kok di 404 apa g terlalu menipu visitor tuch =; tidak jika rajin mantau traffic live, AGC not found bisa sewaktu2 kita sulap jadi real post karena permalink ndak make slug (domain.com/key-key-key.html) :) semoga bermanfaat




    Update yang udah disempurnakan om Xrvel :kembang:

    PHP:
     <?php if (is_single()) {?>
     <?php $edit = array ('-' '/' '.html'); 
     
    $sumber str_replace($edit' '$_SERVER['REQUEST_URI']); 
    ?> 
    <?php 
    // Get RSS Feed(s) 
    include_once(ABSPATH WPINC '/feed.php'); 
     
    $query $sumber 
    $rss fetch_feed('http://www.bing.com/search?q=' str_replace(' ''+'$query) . '&go=&form=QBLH&filt=all&format=rss'); 
     
    if (!
    is_wp_error$rss ) ) : // Checks that the object is created correctly 
    // Figure out how many total items there are, but limit it to 10. 
    $maxitems $rss->get_item_quantity(5); 
     
    // Build an array of all the items, starting with element 0 (first element). 
    $rss_items $rss->get_items(0$maxitems); 
    endif; 
     
    ?> 
    <?php if ($maxitems == 0
    echo 
    ' '
    else 
     
    // Loop through each feed item and display each item as a hyperlink. 
    foreach ( $rss_items as $item ) : ?> 
    <?php  
    $url_separator 
    '-'
    $link strtolower($item->get_title()); 
    $link preg_replace('/([^a-z0-9]+)/i'$url_separator$link); 
    $link trim($link$url_separator); 
    if (
    $link != '') : 
    ?> 
    <center> 
    <a href="<?php echo $link?>.html"><?php echo htmlentities($item->get_title(), ENT_COMPAT'UTF-8'); ?></a> 
    </center> 
    <?php endif; endforeach; ?>  

    <?php }?>
    ini juga bisa diarahkan ke AGC SEARCH / halaman search

    perhatikan link output
    PHP:
    <a href="<?php echo $link?>.html"><?php echo  htmlentities($item->get_title(), ENT_COMPAT'UTF-8');  ?></a> 
    nah tinggal selipkan /search/
    PHP:
    <a href="/search/<?php echo $link?>.html"><?php echo  htmlentities($item->get_title(), ENT_COMPAT'UTF-8');  ?></a> 
     
    Last edited: Apr 27, 2011
    greenskull, ungke, caktakim and 8 others like this.
  2. laziale

    laziale Super Hero

    Joined:
    Nov 13, 2010
    Messages:
    984
    Likes Received:
    40
    ada contoh webste yg pake beginian gan??
     
  3. cruess

    cruess Ads.id Pro

    Joined:
    Mar 8, 2010
    Messages:
    278
    Likes Received:
    3
    Location:
    surabaya
    liat contohnya dong gan .. :hmm:
     
  4. hayelah

    hayelah Super Hero

    Joined:
    May 9, 2009
    Messages:
    2,238
    Likes Received:
    113
    Location:
    Nunukan-Lampung-Indramayu
    msh blm mudeng neh, maklum newbie gak begitu mudeng dgn UGD an ...
     
  5. ofiks

    ofiks Super Hero

    Joined:
    Feb 3, 2010
    Messages:
    840
    Likes Received:
    10
    Location:
    BJ
    udah nyoba bro..trus biar larinya ke hal search gmana bro prafangga..mklum lom mudeng yg gnian:hmm:
     
  6. prafangga

    prafangga Super Hero

    Joined:
    Jan 18, 2010
    Messages:
    1,821
    Likes Received:
    237
    Location:
    Indonesia
    PHP:
    <a href=<?php echo $link?>.html><?php echo $item->get_title(); ?></a>
    jadi
    PHP:
    <a href=search/<?php echo $link?>.html><?php echo $item->get_title(); ?></a>
     
  7. febrilatif

    febrilatif Super Hero

    Joined:
    Jun 12, 2010
    Messages:
    1,704
    Likes Received:
    34
    Location:
    New york
    gak ngerti , nyimak dolo ya

    sapa tau ntar nyantol
     
  8. ooND

    ooND Super Hero

    Joined:
    Jul 24, 2010
    Messages:
    5,707
    Likes Received:
    1,118
    Location:
    Wonosobo, Jawa Tengah, Indonesia, Indonesia
    ente rajin amat bro :swt2: tiap masuk thread ada ente...wkwk :peace:
     
  9. ofiks

    ofiks Super Hero

    Joined:
    Feb 3, 2010
    Messages:
    840
    Likes Received:
    10
    Location:
    BJ
    mkasih bro...lgsung ane cobain....
     
  10. jemblunk

    jemblunk Super Hero

    Joined:
    Sep 7, 2007
    Messages:
    4,315
    Likes Received:
    184
    Location:
    my sweet home
    ikutan bookmark bolehkan Mas Bro :senyum:
     
    deradja and kolomonggo like this.
  11. lerry

    lerry SuperMi

    Joined:
    Oct 21, 2009
    Messages:
    3,500
    Likes Received:
    528
    lagi lagi....... makin berserakan google jadinya :silau:
     
  12. wongndesit

    wongndesit Super Hero

    Joined:
    Dec 17, 2009
    Messages:
    1,236
    Likes Received:
    385
    Location:
    Bojonegoro Matoh
    Nggak Berserakan kok, Apalagi yang untuk membangun link dari Google Trends. dengan sedikit modif akan membangun link dengan otomatis.
    Dari Postingan ini, kembali ingin mengoprek google trends and wal hasil lari ke search result dan tampilan rada lumayan
     
  13. Ian OPX

    Ian OPX Super Hero

    Joined:
    Jun 23, 2009
    Messages:
    1,590
    Likes Received:
    683
    Location:
    yogyakarta
    mangstab nih TS:silau::silau:

    Like meluncur

    ---------- Post added 01-19-2011 at 12:10 AM ---------- Previous post was 01-18-2011 at 11:41 PM ----------

    kalo mo nambahin jumlah link yg digenerate.. gimana, mastah?
     
  14. xrvel

    xrvel Super Hero

    Joined:
    Oct 21, 2007
    Messages:
    2,873
    Likes Received:
    947
    Location:
    Di sini
    Mantap nih TS, coba pasang di blog ah :D
    Btw minta ijin modif sedikit ya.... :kembang:
    PHP:
    <?php $edit = array ('-' '/' '.html');
    $sumber str_replace($edit' '$_SERVER['REQUEST_URI']);
    ?>
    <?php
    // Get RSS Feed(s)
    include_once(ABSPATH WPINC '/feed.php');

    $query $sumber ;
    $rss fetch_feed('http://www.bing.com/search?q=' str_replace(' ''+'$query) . '&go=&form=QBLH&filt=all&format=rss');

    if (!
    is_wp_error$rss ) ) : // Checks that the object is created correctly
    // Figure out how many total items there are, but limit it to 10.
    $maxitems $rss->get_item_quantity(5);

    // Build an array of all the items, starting with element 0 (first element).
    $rss_items $rss->get_items(0$maxitems);
    endif;

    ?>
    <?php 
    if ($maxitems == 0)
    echo 
    ' ';
    else

    // Loop through each feed item and display each item as a hyperlink.
    foreach ( $rss_items as $item ) : ?>
    <?php 
    $url_separator 
    '-';
    $link strtolower($item->get_title());
    $link preg_replace('/([^a-z0-9]+)/i'$url_separator$link);
    $link trim($link$url_separator);
    if (
    $link != '') :
    ?>
    <center>
    <a href="<?php echo $link?>.html"><?php echo htmlentities($item->get_title(), ENT_COMPAT'UTF-8'); ?></a>
    </center>
    <?php endif; endforeach; ?>
     
    prafangga and glodakan like this.
  15. prafangga

    prafangga Super Hero

    Joined:
    Jan 18, 2010
    Messages:
    1,821
    Likes Received:
    237
    Location:
    Indonesia
    Oh begitu tah hehe sip masbro dapet ilmu baru nich. Jgn bosen2 revisi yah masbro. Ijin copy scriptnya buat nambal yg lama :D

    ---------- Post added at 04:07 AM ---------- Previous post was at 04:04 AM ----------

    $maxitems = $rss->get_item_quantity(5)

    ---------- Post added at 04:21 AM ---------- Previous post was at 04:07 AM ----------

    Ampun masbro :D memang tujuan saya optimasi 404 tp tanggung jawab kok ke visitor, saya pantau traffic pengunjung. halaman 404 yg sering dikunjungi saya sulap jadi real content. (cari referensi artikel yg dicari) buat nambal 404 (artikel yg blum ada sebelumnya).
    Sama kan yg dilakukan seo sniper :D menyediakan artikel yg dibutuhkan pengunjung. Bedanya saya ndak nembak, tp menampung aspirasi pengunjung. :ampun:
     
  16. rheeantz

    rheeantz Ads.id Pro

    Joined:
    Mar 16, 2010
    Messages:
    459
    Likes Received:
    12
    Location:
    Solo - Ponorogo PP
    Ini yang ane dari dulu Mas Bro ternyata ketemu da sini , ijin praktek semoga berhasil :)
     
  17. arramuse

    arramuse Super Hero

    Joined:
    Oct 24, 2008
    Messages:
    3,817
    Likes Received:
    446
    Location:
    Dead Inside
    PHP:
    $rss fetch_feed('http://api.search.yahoo.com/WebSearchService/rss/webSearch.xml?appid=yahoosearchwebrss&query=' str_replace(' ''+'$query) . '&adult_ok=1&start=1');
    cuman mu nambahin ajah.. neh untuk Yahoo-nya, :D
     
    prafangga likes this.
  18. daoes_com

    daoes_com Super Hero

    Joined:
    Feb 16, 2010
    Messages:
    831
    Likes Received:
    28
    Jadi komplit :D
     
  19. daeng palopo

    daeng palopo Ads.id Fan

    Joined:
    Nov 11, 2010
    Messages:
    184
    Likes Received:
    6
    Location:
    Palopo, Makassar
    hehehe.. nonton aja nih para masta oprek2an..
     
  20. maxall

    maxall Super Hero

    Joined:
    Mar 4, 2010
    Messages:
    2,381
    Likes Received:
    501
    weh mantep,lama lama script agc bakal makin sederhana neh :swt2:
     

Share This Page