I have a page that loads content from a mysql db and I need the iframes to load after the main page as there are over 20 iframes and it slows down the page significantly.
<?php
$con = mysql_connect("localhost","####","####");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("daniel_login", $con);
$result = mysql_query("SELECT * FROM replays ORDER BY id DESC");
while($row = mysql_fetch_array($result))
{
echo "<div class=\"col-sm-6 col-xs-12 masonry__item\" data-masonry-filter=\"" . $row['category'] . "\">";
echo "<div class=\"portfolio-item portfolio-item-2 video-cover\" data-scrim-bottom=\"9\">";
echo "<div class=\"background-image-holder\"><img src=\"../img/" . $row['image'] . "\" /></div>";
echo "<div class=\"portfolio-item__title\"><h5>" . $row['h1'] . "</h5><span><em>" . $row['h2'] . "</em></span></div><div class=\"video-play-icon video-play-icon--sm\"></div>";
echo "<div id=\"dna_video\"></div>";
echo "<iframe src=\"" . $row['video'] . "?autoplay=0\" allowfullscreen=\"allowfullscreen\"></iframe></div></div>";
}
mysql_close($con);
?>
I have tried many of the scripts online to no avail.