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

Getting Your Next iPhone for FREE
Posted on May 15, 2011  |  Comments I'm just sharing my experience in selling my previous iphone to get the most recent iphone. I love my iphone and i'm sure you love yours too.
Show Some Web Typography Love Using Typekit
Posted on May 12, 2011  |  Comments Typekit is a simple add-on to your site that allows the use of custom fonts. They have hundreds in their library. It's simple, light-weight, and compatible to most browsers.