Answers for "wistia embed iframe options"

0

embed / iframe website into my own website

----------------
INDEX.PHP
----------------
use iframe 
<iframe src="mysite.com/preview.php" width="100%" height="100%" frameBorder="0"></iframe>

----------------
PREVIEW.PHP
----------------
<?php 

$_GET   = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);
$_POST  = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
$url = "put the url here";
$curl = curl_init();
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_getinfo($curl, CURLINFO_HTTP_CODE);
$result = curl_exec($curl);
// echo "Info: " . print_r(curl_getinfo($curl), true) . "n";

$info = curl_getinfo($curl);
if ($info["http_code"] == "400" ) {
	echo "<h1>This page is not allowed to curl or having BAD request URL.</h1>";
}
else{
	print($result);
}
?>
Posted by: Guest on March-04-2021
0

use javascript to control iframe elements

<iframe id="myIFrame" src="thispage.html"
    width="100%" height="600"
    frameBorder="2">
</iframe>

// Get the iframe
const iFrame = document.getElementById('myIFrame');

// Let's say that you want to access a button with the ID `'myButton'`,
// you can access via the following code:
const buttonInIFrame = iFrame.contentWindow.document.getElementById('myButton');

// If you need to call a function in the iframe, you can call it as follows:
iFrame.contentWindow.yourFunction();
Posted by: Guest on May-02-2021

Browse Popular Code Answers by Language