..used one or more modules you must have seen the iframes used for realtime result display. In this tutorial I'm going to show you how to insert them into your module and how they..
<?php
/* Fetches robots.txt */
if(!defined("IN_SCRIPT")){
exit;
}
echo Screen("<br />\n<b>Fetching robots.txt...</b><blockquote>\n",$_CONTEXT['verbose'],$_CONTEXT['silent']);
$ch = curl_init();
$sTarget = $sHost."/robots.txt";
curl_setopt($ch, CURLOPT_URL, $sTarget);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101506 Ubuntu/10.04 (lucid) Firefox/3.6.13 GTB7.1');
$sResult = @curl_exec($ch);
$iHTTP = @curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($iHTTP==200){
echo Screen(nl2br($sResult),$_CONTEXT['verbose'],$_CONTEXT['silent']);
if(in_array("browsable.php",$aLoad)){
// browsable is also there, we will store this content
$_CONTEXT['browsedirs'] = $sResult;
}
}
else{
echo Screen("<b id=h7>Failed to find robots.txt</b><br>\n\n",$_CONTEXT['verbose'],$_CONTEXT['silent']);
}
echo Screen("</blockquote>\n",$_CONTEXT['verbose'],$_CONTEXT['silent']);
flush();
ob_flush();
?>