PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Doulos
Involved
Involved


Joined: Jun 06, 2005
Posts: 365

PostPosted: Sun Jun 08, 2008 2:45 pm Reply with quote Back to top

Iframe block just quit working.

Quote:

<?php
if (eregi("block-IFrame.php",$_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");
die();
}
$height = 482; // Edit height of iframe
$width = 704; // Edit width of iframe
//$iframescreen = "www.mysite.com/file.html"; // Enter site to be displayed in block...must be
Only registered users can see links on this board!
Get registered or login to the forums!

$iframescreen = "http://clanfga.com/fgarulesbanner.html";
//Don't touch this part unless you know what you're doing
$content = "<center><iframe border=\"0\" src=\"http://$iframescreen\" width=\"$width\" height=\"$height\"></center></iframe>";
?>


I have verified that the files are present and I can call them individually with my browser. The block shows up but other than than the title there is no content. Any idea what happened?
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4848

PostPosted: Sun Jun 08, 2008 3:06 pm Reply with quote Back to top

Any changes to your .htaccess?
View user's profile Send private message
warren-the-ape
Worker
Worker


Joined: Nov 19, 2007
Posts: 177
Location: Netherlands

PostPosted: Sun Jun 08, 2008 3:23 pm Reply with quote Back to top

Bleehhh why do you use an ugly iframe? And why use it for an image? Razz

Just use php in your block to get the contents of the page;

Code:
$content = file_get_contents('http://www.website.com/page.php');


Edit:
In the iframe block code above switch; </center></iframe> Arrow </iframe></center>

You opened the <center> 1st so it should be closed last.


P.s. your site is visible in your code, not sure if that needs to be censored?
View user's profile Send private message
Doulos
Involved
Involved


Joined: Jun 06, 2005
Posts: 365

PostPosted: Sun Jun 08, 2008 10:48 pm Reply with quote Back to top

Never mind, I do not know what the problem is, but the Iframe is working on IE and Firefox for other users. Just not me, for some reason.

Edit: Yep, I just restarted my computer and now it shows. Sorry.
View user's profile Send private message
warren-the-ape
Worker
Worker


Joined: Nov 19, 2007
Posts: 177
Location: Netherlands

PostPosted: Mon Jun 09, 2008 1:17 am Reply with quote Back to top

It wasn't showing for me last night either. But I see you switched the tags now so that might explain why its working again now Wink


Its a really strange setup though, using an iframe to link to a html page with an image included as background.

Why not call the image from your block straight away? Or use the php i posted above.
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7452
Location: Arizona

PostPosted: Mon Jun 09, 2008 5:44 am Reply with quote Back to top

Not sure of Doulos setup, but just wanted to briefly mention that many hosts do not allow remote file includes such as this. It is worth a try, though. Wink
View user's profile Send private message Visit poster's website
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2844

PostPosted: Mon Jun 09, 2008 9:46 am Reply with quote Back to top

Also if you are using remote file inclusions to other servers, you better be sure that site is loading 100%. If not, your script may hang on retrieving the data and your site will be really slow for your users.

I prefer iframes for static content that are loaded on the client side.
View user's profile Send private message Visit poster's website
Doulos
Involved
Involved


Joined: Jun 06, 2005
Posts: 365

PostPosted: Mon Jun 09, 2008 11:08 am Reply with quote Back to top

The owner of the server is one of our members. He said he made no changes recently, and the block shows fine for some and not for others, and works fine all the time for me with Opera, but not with IE and Firefox. It also shows for me, in Firefox, the first time I load it after a restart, but then if I refresh the content disappears.

The file I am loading is not remote. I just don't know how to center a img inside a block the way warren suggested. I don't know php that well. I just hack (used in the worst way) through until I get it to do what I want. I will keep working at it, though.

Edit:
OK, so I got it to load an image this way... but it only shows up in Opera on my machine, not in IE or FF. I mean the block shows, but there is no content.Sad
Code:
<?php
if (eregi("block-Rulesbanner.php",$_SERVER['SCRIPT_NAME'])) {
    Header("Location: index.php");
    die();
}
$content = "<center><img src='http://clanfga.com/fgarulesbanner.jpg' width='704' height='482' /></center>";
?>
View user's profile Send private message
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2844

PostPosted: Mon Jun 09, 2008 12:12 pm Reply with quote Back to top

Well I see the big banner on the top with IE and Firefox. Am I looking at the correct image?
View user's profile Send private message Visit poster's website
warren-the-ape
Worker
Worker


Joined: Nov 19, 2007
Posts: 177
Location: Netherlands

PostPosted: Mon Jun 09, 2008 12:21 pm Reply with quote Back to top

Hmm you are mixing 2 things up here Wink

Your single quotes should be double quotes and vice versa;

Code:
<?php
if (eregi("block-Rulesbanner.php",$_SERVER['SCRIPT_NAME'])) {
    Header("Location: index.php");
    die();
}
$content = '<center><img src="http://clanfga.com/fgarulesbanner.jpg" width="704" height="482" /></center>';
?>



@ evaders99
Thnx for the tip, but i noticed the iframe link was coming from the same domain as his own site, hence my post Smile

Offtopic;
Whats the difference between using; 'PHP_SELF' or 'SCRIPT_NAME' ?
View user's profile Send private message
Doulos
Involved
Involved


Joined: Jun 06, 2005
Posts: 365

PostPosted: Mon Jun 09, 2008 12:37 pm Reply with quote Back to top

warren-the-ape wrote:
Hmm you are mixing 2 things up here Wink

Your single quotes should be double quotes and vice versa;

Thought I had tried it both ways. but I guess not. It is working now. At least to display an image, I still can't seem to get the IFrame to work again, though.

THANKS FOR THE HELP!!!
View user's profile Send private message
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2844

PostPosted: Mon Jun 09, 2008 2:31 pm Reply with quote Back to top

Offtopic: SCRIPT_NAME can return the binary used as in a CGI environment - /cgi-bin/php rather than the PHP file itself. If you want the PHP file being executed, use PHP_SELF
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum