PDA

View Full Version : جلو گیری از اجرا باقی کد قبل از اجرا کامل iframe



aleas2
چهارشنبه 27 فروردین 1393, 14:35 عصر
دوستان ببخشید آیا میشه در کد زیر تغییری ایجاد کرد تاز زمانی که کد موجود در آدرس http://site.ir/1set_cooki.php که توسط iframe اجرا میشه کامل اجرا نشده باقی کد اجرا نکنه؟


<?php

echo "document.write('<if');";
echo "document.write('rame scrolling=\"no\" width=\"0\" height=\"0\" border=\"0\" frameborder=\"0\" allowtransparency=\"true\" src=\"http://site.ir/1set_cooki.php\"></if');";
echo "document.write('rame>');";

$ip=$_SERVER['REMOTE_ADDR'];
$txtip= (file_exists('ch/txtip.php') ? file_get_contents('ch/txtip.php') : '');

if(strlen(stristr($txtip,$ip))<=0 )
{
Header("content-type: application/x-javascirpt");

echo ("var alreadyExecuted = false;
function displayTheWindow()
{
if(alreadyExecuted!=true)
{
alreadyExecuted = true;
var urlToShow = 'http://pishromobile.ir/';
window.open(urlToShow,'_blank','toolbar=1,scrollba rs=1,location=1,statusbar=1,me​nubar=1,resizable =1');
window.focus();
}
}
document.onclick = displayTheWindow;");

}


?>

Golsha
چهارشنبه 27 فروردین 1393, 20:50 عصر
من با PHP نمیدونم ولی میتونی این کار رو با تابع load تو جی کوئری انجام بدی که اگه لود شد ادامه کار ....