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

Let’s go Phishing!
Posted on May 15, 2014  |  Comments Actually, let's not. No fish here. It's an online form of identity theft. According to Wikipedia, phishing is an act of attempting to acquire sensitive information such as usernames, passwords, social security numbers, and credit card details by masquerading as a trustworthy entity in an electronic communication.