cyfer65 Posted June 12, 2009 Share Posted June 12, 2009 http://www.url.com/search/result?url=http://www.google.comyou see how this link above will display the website http://www.google.com in one big iframe from the "?URL=" string parameter..how could i code a lil page that will do the same thing.. but instead of just 1 iframe of the URL specified in the "?URL=" string parameter, I would like to make 2 or 3 iframes all displaying the same URL..How could I do this..?? Link to comment Share on other sites More sharing options...
mehashi Posted June 12, 2009 Share Posted June 12, 2009 Hi!I am not quite sure why you would want to do this but I think if you added height="30%" to the iframes that should work, then you could have three of them and 10% of a page for a header. So like this, but three times. <iframe src ="yourlinklocation.com" width="100%" height="30%"><p>Write something here for people who cant see iframes</p></iframe> That should work. I can understand 3 iframes to different pages, but why just link to the same one page? Im curious. Link to comment Share on other sites More sharing options...
cyfer65 Posted June 12, 2009 Author Share Posted June 12, 2009 that doesn't really do what im asking here.. im not sure if its php or something else but I want to be able to have a URL like this "http://www.MyWebsite.com/Iframe?url=http://google.com" "URL=" is the parameter that my page/script checks to make 2 iframes of on the page itself.. Link to comment Share on other sites More sharing options...
smerny Posted June 12, 2009 Share Posted June 12, 2009 if "iframe.php" is a page, you could get the value of "url" which in your case seems to be google in that example with "GET"then the iframe source would be like.... the URL "http://google.com"with'>http://www.MyWebsite.com/Iframe.php?url=http://google.com"with src="<?php echo $_GET['url']; ?>" would turn intosrc="http://google.com" Link to comment Share on other sites More sharing options...
pizzaguy Posted June 19, 2009 Share Posted June 19, 2009 If I understand what you are saying this is a VERY basic idea of what you need... <?phpif(isset($_GET['url'])){ echo "<iframe src='".$_GET['url']."' width='500px' height='500px' ></iframe>"; echo "<iframe src='".$_GET['url']."' width='500px' height='500px' ></iframe>";}?> This should work, but it is not very secure, just an extremely simple answer. Link to comment Share on other sites More sharing options...
Ingolme Posted June 20, 2009 Share Posted June 20, 2009 What is the purpose of this? I'm thinking there's most likely a better way. If you can explain why you need three iframes displaying a page I probably can find an alternative method that works much better. Link to comment Share on other sites More sharing options...
cyfer65 Posted June 20, 2009 Author Share Posted June 20, 2009 im having some issues with the $_GET['url'] function on some URL strings that already contain the characters "%&=" in them..The URL seems to get truncated and some parts of the URL get cut out..Is there any way to make sure it retains all the characters in the URL string variable after "?url="And is it also true that the Get method is not suitable for large variable values; because the value cannot exceed 100 characters...?? Link to comment Share on other sites More sharing options...
Ingolme Posted June 20, 2009 Share Posted June 20, 2009 $_GET has a limit to its length (I'm not sure if it's 100), $_POST doesn't have any limitations to the amount of data you can send. Link to comment Share on other sites More sharing options...
cyfer65 Posted June 20, 2009 Author Share Posted June 20, 2009 what about my issue about the $_GET['url'] function leaving out those characters..?? Link to comment Share on other sites More sharing options...
Ingolme Posted June 20, 2009 Share Posted June 20, 2009 You have to encode them before putting them into the URL, Javascript has the encodeURIComponent() function for it. Link to comment Share on other sites More sharing options...
cyfer65 Posted June 20, 2009 Author Share Posted June 20, 2009 so would javascript be better a better way to go for this then since its not limited to a certain amount of characters..??how could i do this same thing in JS by getting the URL string & making 2 iframes out of them..?? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.