I want to make a website the changes the title and the Facebook Open Graph description everytime the page loads. I know how to change just the title but not the Open Graph tags because they use HTML characters.
Here is how i will do it with PHP just for the title
<html>
<head>
<title><?php
$titles = array();
$titles[] = "Possible Title 1";
$titles[] = "Possible Title 2";
$titles[] = "Etc. Etc.";
srand ((float) microtime() * 10000000); // Seed the random number generator
echo $titles[array_rand($titles)]; // Pick a random item from the array and output it
?></title>
</head>
<body>
</body>
</html>
This are the tags i want to randomize:
<meta property="og:title" content="Possible title 1" />
<meta property="og:image" content="Possible image 1" />
<meta property="og:description" content="Possible description 1 "/>
<title>Possible title 1</title>