/    Sign up×
Community /Pin to ProfileBookmark

limit of iframes per page?

i have about 55 iframes on a page and only 10/15 seem to be loading. it’s the first 10/15. is there a known amount of iframes allowed? the page is .php

to post a comment
HTML

16 Comments(s)

Copy linkTweet thisAlerts:
@soccer362001Nov 28.2003 — link please
Copy linkTweet thisAlerts:
@hammerslaneauthorNov 28.2003 — yea sorry - i've been working on getting some more information... i'm trying to scale down an attachment of a screenshot.

10 minutes....
Copy linkTweet thisAlerts:
@pyroNov 28.2003 — [i]Originally posted by hammerslane [/i]

[B]i have about 55 iframes on a page[/B][/QUOTE]
Why? Surly there must be a better way...?
Copy linkTweet thisAlerts:
@hammerslaneauthorNov 28.2003 — the source of each iframe is:

<a href="main.php?link=[websiteurl]">

i've attached what the page is showing. as you can see, only the first ten iframes are displaying stuff, the rest just display [i]"The page cannot be displayed

The page you are looking for.... "[/i]
. All the error messages suddenly appear all at the same time, which makes me think that it's either an IE restriction, or an html rule that no more than 10 iframes are allowed... to save millions of different websites being loaded in secret?

*shrugs*

hope this extra information can be of some use.... the problem is really puzzling me.

[b]attachment[/b]: [url=http://www.hammerslane.com/avatar/ping.jpg]ping.jpg[/url]
Copy linkTweet thisAlerts:
@hammerslaneauthorNov 28.2003 — [i]Originally posted by pyro [/i]

[B]Why? Surly there must be a better way...? [/B][/QUOTE]
? i hope there is... although i've spent 2 hours getting it to work that way...

if i just paste the same code 55 times on one page, it doesn't run it all.

i'm just improvising really... using my html knowledge to try and do something with my limited php knowledge...


here's the code for the parent frame of the iframe page


[code=php]

<table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0" bordercolor=black>

<tr>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.fff.co.uk#bottom">

</iframe> </td>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ddd.co.uk#bottom">

</iframe> </td>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.sss.co.uk#bottom">

</iframe> </td>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.eee.co.uk#bottom">

</iframe> </td>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.eliams.co.uk#bottom">

</iframe> </td>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.kio.co.uk#bottom">

</iframe> </td>

</tr>

<tr>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.bdsfsdfc.co.uk#bottom">

</iframe> </td>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.example.co.uk#bottom">

</iframe> </td>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.nih.co.uk#bottom">

</iframe> </td>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.accations.co.uk#bottom">

</iframe> </td>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.lycs.co.uk#bottom">

</iframe> </td>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.alls.co.uk#bottom">

</iframe> </td>

</tr>

<tr>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.apl.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.avno.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ba.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.bestate.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.bes.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.care.co.uk#bottom">

</iframe> </td></tr>

<tr>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.briy.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=frei.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=pays.ii.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.dign.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.eliams.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.foters.co.uk#bottom">

</iframe> </td></tr>

<tr>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.frei.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.frew.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.furre.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.glas-uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.globatair.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.globaement.co.uk#bottom">

</iframe> </td></tr>

<tr>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.goddes.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.henry-hughes.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ifscfc.o#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ioup.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ic.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ibc.net#bottom">

</iframe> </td>
</tr>

<tr>
<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.icc.net#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.inance.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ircles.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.j.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.lgs.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.faircentral.co.uk#bottom">

</iframe> </td>
</tr>

<tr>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ent.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.esample.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.tion.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ation.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ration.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.eration.com#bottom">

</iframe> </td>
</tr>

<tr>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.nmichel.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.f.org#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.i.nl#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ton.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.oo.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.oogle.com#bottom">

</iframe> </td>
</tr>

<tr>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.re.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.nce.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.iph.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.aster.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.mple.com#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.e.co.uk#bottom">

</iframe> </td>
</tr>

<tr>

<td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.ddster-shop.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.sesssfdfse.co.uk#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.siplysdfsdfone.biz#bottom">

</iframe> </td><td width=5 % align=center>
<iframe height=100% width=100% src="main.php?link=www.thweweny.co.uk#bottom">

</iframe> </td><td width=5 % align=center>&nbsp;

</td><td width=5 % align=center>&nbsp;

</td>
</tr>



</table>

[/code]
Copy linkTweet thisAlerts:
@ray326Nov 28.2003 — Ok well that looks looney as hell but I'll admit I have absolutely no idea what you're trying to accomplish there. There are no restrictions in the standards about how many of anything can appear in the body of a page but I have definitely seen browsers run out of resources and fail to completely render pages with huge numbers of widgets like text boxes.

What happens if you give each iframe a distinct id then run a Javascript loop setting each of their srcs individually; possibly with a delay between each one. My thinking on this is that it may be a network-related issue rather than anything else. Also, what happens when you load that page into Mozilla?
Copy linkTweet thisAlerts:
@hammerslaneauthorNov 28.2003 — erm... i'm not hot with javascript:

i'm going home for the weekend now though, i'll definitely check this thread and do some more research on monday.

a little knowledge is dangerous... as i have proven above...

regards
Copy linkTweet thisAlerts:
@pyroNov 28.2003 — Or, perhaps if you tell us what it is that you are trying to do, we can point out a more elegant solution... ?
Copy linkTweet thisAlerts:
@hammerslaneauthorNov 29.2003 — lol that's true. i'm at home now, so i don't have access to the code, but i'll describe the whole project that i'm working on.

it's essentially two documents in total, which sit on the company intranet. the purpose of the script(s) is to ping many different websites (55), and alert me via email if the website isn't working.

the parent frame is called index.php, the code fot that is above.

it just tells main.php which address to ping.

all the individual ping scripts work fine on their own, it's just that 45 of the iframes don't load when they're viewed all on one page.

i'll keep giving info until you know what i mean...
Copy linkTweet thisAlerts:
@pyroNov 29.2003 — I'd just use one PHP (or maybe Perl) script to ping each website and keep track of the results. Then, when it is finished, email the results.
Copy linkTweet thisAlerts:
@Cactus_HuggerNov 29.2003 — Geez... definatly use PHP / Perl.

This is a simply problem with PHP:

Simply have an array of urls, then you can use fopen() on the url, (make sure you have allow_url_fopen enabled) and if fopen returns false, then the site is down. Use that and loop through the array of URLs. (I think that there are other ways w/ PHP too...)

You could even use php to read in a file of urls...

Something like this:
[code=php]
<?php
$urls = file("myurls.txt");

for($x = 0; $x < count($urls); $x++)
{
$goto = str_replace("rn", "", $urls[$x]);
$fp = fopen($goto, "r");
if(!$fp) echo $goto . " is down.<br>n";
else fclose($fp);
}
echo "Done.";
?>[/code]

Been awhile since I've done any PHP... hopefully that's error-free. Just place all URLs in file myurls.txt, with a blank line at the end.

EDIT: Stated some corrections in my next post, the above code now reflects those changes, and has been tested and works. Example myurls.txt:

http://google.com

http://www.aol.com

(Blank line!)
Copy linkTweet thisAlerts:
@hammerslaneauthorDec 01.2003 — the ping script isn't really the problem...[code=php]<?
function chkuri($link){
$churl = @fopen("http://".$link,'r');
if (!$churl) {
$message="site link <b>http://$link <font color="red"> is down!!</font></b><br><br>n";
mail("[email protected]", "$link is down!! #LID", "$link went down!");
}else{
$message="site link <a href="http://$link" target=_blank><b>http://$link</b></a> OK!<br>";
}
return $message;
}

function ping($link){
$packs=5;
for ($tt=0;$tt<=$packs;$tt++){
$a=getmstime();
$churl = @fsockopen(server($link), 80, &$errno, &$errstr, 20);
$b=getmstime();
if (!$churl){
$teim="down!!"; break;
}
$teim=$teim+round(($b-$a)*1000);
@fclose($churl);
}
if ($teim=="down!!"){}else{if(($teim/$packs)<3){$teim="<3 ms";}else{$teim=($teim/$packs)." ms";}}
return $teim;
}

function server($link){
if(strstr($link,"/")){$link = substr($link, 0, strpos($link, "/"));}
return $link;
}

function getmstime(){
return (substr(microtime(),11,9)+substr(microtime(),0,10));
}

function correcturl($link){
return str_replace("http://","",strtolower($link));
}

function selfnam(){
global $PHP_SELF;
return basename($PHP_SELF);
}

$link=correcturl($link);
echo "ping server <b>http://".server($link)." (".ping($link).")</b><br>";
echo chkuri($link);

echo "<form action=".selfnam()." method=get>";
echo "http://<input type=input name=link value="$link" size=60>";
echo "<input type=submit name=check value=check>";
echo "</form>";
?>[/code]
is what i have. on the parent frame, [as my code a few posts ago illustrates], i pass the $link url variable over. the script actually works. except only on the 10 first frames.

if you actually run that script i said above, then you'll see that the 'teim' variable returns an error. i think maybe the fact that there are 10 variable errors before it returns errors could be the problem.

hmm. i obviously know so little, so i'm going to go and move into my beginning php book.

regards.
Copy linkTweet thisAlerts:
@Cactus_HuggerDec 02.2003 — Hmm... I get and error on line five. Seems like a quote problem. (Unexpected T_STRING) (You're using a " in a string... it thinks thats the end of the string, and tries to read on, use a " instead.)

Line 5 I changed to..:
[code=php]$message="site link <b><a href="http://" target="_blank">http://</a>$link <font color="red"> is down!!</font></b><br><br>n";[/code]

Line 8 changed to...:
[code=php]$message="site link <a href="http://$link" target=_blank><b><a href="http://" target="_blank">http://</a>$link</b></a> OK!<br>";
[/code]


And line 48:
[code=php]echo "ping server <b><a href="http://" target="_blank">http://</a>".server($link)." (".ping($link).")</b><br>";
[/code]


Once I changed that the script worked fine, with a few exceptions. Then you could just loop through a text file and find those, and use the chkuri();.

One more correction to my code... the $x < count($urls) - 1; -- Remove the - 1, unless you place a letter/word on the last line... and the str_replace("n".... might need rn depending on the OS.

The only errors I'm left with is:

"PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer." (Line 17)
Copy linkTweet thisAlerts:
@hammerslaneauthorDec 02.2003 — i can't say thankyou enough for the guidance you've given me... well i could, but it'd probably waste my time typing it, and your time reading it

the thing you said about chkuri("myurls.txt")

would that be the right thing to put instead of chkuri($link) ?

there are many references to $link that would go on error, if i didn't pass across a $link variable...

thanks again

regards


edit: i fixed all the parse errors, or whatever the problem was with all the stray quote marks, but now the error is:
Notice: Undefined variable: teim in \hostnamepathtopingscript.php on line 23
ping server <a href="http://www.example.com">http://www.example.com</a> (47.4 ms)


line 23: [code=php]$teim=$teim+round(($b-$a)*1000);[/code]

it clearly defines $teim... but it still returns the error.

weird.
Copy linkTweet thisAlerts:
@hammerslaneauthorDec 02.2003 — ok, i've figured out my original problem.

it's nothing to do with the script having errors, it's just the browser timeout :rolleyes: that's a different thread though... ?

something to do with the registry with fix my problem i'm sure.

Cactus Hugger. with your script, i tried it, and it said this;Warning: fopen(<a href="http://www.example.com">http://www.example.com</a>) [function.fopen]: failed to create stream: HTTP request failed! VMöw in \hostSharedWebintranetpingping.php on line 7

Fatal error: Maximum execution time of 30 seconds exceeded in \hostSharedWebintranetpingping.php on line 7

Line 7: [code=php] $fp = fopen($goto, "r");[/code]
Copy linkTweet thisAlerts:
May 13.2024 — very informative articles or reviews at this time.
×

Success!

Help @hammerslane spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...