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

“Unlimited”
Posted on December 14, 2011  |  Comments I'm talking about ISPs and data plans that are providing "Unlimited" plans. Or so they say?
Creating QR Codes
Posted on November 12, 2011  |  Comments QR Codes (Quick Response Codes) is matrix/2-dimensional barcode system used to store links and images and codes. I think it's a lazy way of adding links - no need to type your URL, just scan on your phone.