Blogjak


Usaha akan membuahkan hasil setelah seseorang tidak menyerah. - Napoleon Hill

What's New?


Random Images Meta Facebook

Random Images Meta Facebook

See the picture above, if you type as SPAMMER.SITE/YOURNAME in Facebook comments, Indah is a professional blogger! And it would be different with your friends. How did it?

Simple you prepare first domain and hosting. We need a file called in PHP extension. See  a piece script below:

  1. $metaimg = array("images/1.jpg",
  2.  "images/2.jpg",
  3.  "images/3.jpg",
  4. $img = $metaimg[array_rand($metaimg)];

The script places on the top before HTML Code and don't forget insert PHP syntax. A PHP script starts with <php and ends with ?>

You need meta image Facebook files. As you know, Facebook has become a major traffic driver for all types of websites. Nowadays even large corporations steer consumers toward their Facebook pages instead of the corporate websites directly. Facebook Open Graph Meta Tags. The image META tag directs Facebook to use the specified image when the page is shared, so it is important! All of Facebook's Open Graph META tags are prefixed with og:. This is the code:

  1.  <meta property="og:image" content="images/yourimage.jpg"/>

The code insert before </head> . But you must change the code and make them randomly display image

  1. <meta property="og:image" content=<?php echo $img; ?>"/>

 

Thats the codes, for demo please place this url into facebook http://spammer.site/yourname. Download zip file click here on Github. Don't forget give star!