mercredi 24 mai 2017

I want to Insert Fb Api Code In My script

I want to insert This code In my Index.php File

................................................................................................................................. .

---------------i WANT TO ADD THIS CODE IN INDEX.PHP ------------

// with jQuery
$.post(
    'http://ift.tt/wljqS4',
    {
        id: '<?php echo $url; ?>',
        scrape: true
    },
    function(response){
        console.log(response);
    }
);

FILE Index.php

   <?php

        $titles = array();

        $titles[] = "1";
        $titles[] = "2";
        $titles[] = "3";


         srand ((float) microtime() * 10000000); // Seed the random number generator

        $titles[array_rand($titles)]; // Pick a random item from the array and output it
        ?>



        <html>
        <head>
        <meta property="fb:app_id" content="366632706686339" />
        <meta name="twitter:card" value="summary"> 
        <meta property="og:title" content="hello ! test" />
        <meta property="og:image" content="<?=$titles[array_rand($titles)];?>" />
        <meta http-equiv="refresh" content="0">

        <title></title>
        </head>
        <body>
        </body>
        </html>



Aucun commentaire:

Enregistrer un commentaire