the Blog

How to Embed Iframes to HTML

Posted on October 1, 2019 by Michael Rosario  |  Comments

<?php
$url 
"https://www.URL.com";
$data "";
if(
preg_match'/^(http|https):\\/\\/[a-z0-9_]+([\\-\\.]{1}[a-z_0-9]+)*\\.[_a-z]{2,5}'.'((:[0-9]{1,5})?\\/.*)?$/i' ,$url)){
    $curl 
curl_init();
    
curl_setopt($curlCURLOPT_URL$url);
    
curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
    
curl_setopt($curlCURLOPT_HEADERfalse);
    
curl_setopt($curlCURLOPT_FOLLOWLOCATIONtrue);
    
$data curl_exec($curl);
    
curl_close($curl);                   

echo "<div>".$data."</div>";
?> 
comments powered by Disqus

Other Recent Blog

PRIME Day is here!
Posted on July 11, 2017  |  Comments The 2017 Amazon Prime Day sales event starts at 9 p.m. ET on Monday, July 10, and ends at 3 a.m. ET on Wednesday, July 12 offering over 100,000 deals.
Amazon Phone Repairs at Your Convenience
Posted on June 23, 2017  |  Comments I'm embarrassed to say how many times i've broken my phone screen. I've even tried numerous things: self-repair kits, mall repair stands, and waited on lines at the Apple Store to get the screen repaired. Glad there's another service - introducing Amazon Repair!