Jump to content

Recommended Posts

Hello EXPERTS ,

 

i want to Frame many pages of same code so how to do it from one page

 

example 1 =

www.abcd.com/Frame1.html [has the code given below in it]

<iframe src="http://abcdsecond.com/Frame1.html" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

 

www.abcd.com/Frame2.html [has the code given below in it]

 

<iframe src="http://abcdsecond.com/Frame2.html" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

 

and so on , so is it possible to create one php script in www.abcd.com so when abcd.com/Frame1.html or Frame2.html or Frame3.html is run it will run this code

<iframe src="http://abcdsecond.com/Frame1.html" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

<iframe src="http://abcdsecond.com/Frame2.html" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

<iframe src="http://abcdsecond.com/Frame3.html" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

 

would appreciate help

 

Link to comment
https://forums.phpfreaks.com/topic/252991-simple-help-needed/
Share on other sites

i have found this code ...

<?php

//default url if none is set
$nourl = "http://www.domainname.com";   

    $url=$_GET["url"];
    if(!$url)
    {
        $url=$nourl;
    }
?>
<html>
<head>
<title>YOUR TITILE</title>
</head>

<frameset rows="85px,*" frameborder="NO" border="0" framespacing="0">
  <frame src="frame.php?url=<?php echo"$url" ?>" name="frame" scrolling="NO" noresize>
  <frame src="<?php echo "$url"; ?>" name="main">
</frameset>
<noframes>
<body>

</body>
</noframes>
</html> 

 

 

how to replace "<frameset rows="85px,*" frameborder="NO" border="0" framespacing="0">

  <frame src="frame.php?url=http://website.com" name="frame" scrolling="NO" noresize>

  <frame src="http://website.com" name="main">

</frameset>

<noframes>  to this one====== <iframe src="http://website.com" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe> ======

Link to comment
https://forums.phpfreaks.com/topic/252991-simple-help-needed/#findComment-1297078
Share on other sites

You could have a list or array() of your urls, and then loop all the iframe codes within a foreach().

 

But sadly because many websites "jump out of frame", it will then just visit the first website that redirects and not show all your iframed sites.

Try my site or yahoo as one of the url's and see.

http://dynaindex.com

http://www.yahoo.com

<?php
$site_array = array("http://www.imdb.com","http://www.bing.com/","http://www.dogpile.com");

foreach($site_array as $site){
echo "<iframe name='$site' src='$site' width='100%' height='100%' frameborder='0' ></iframe><br />";
}

?>

 

Link to comment
https://forums.phpfreaks.com/topic/252991-simple-help-needed/#findComment-1297137
Share on other sites

sir i do not want to rotate url

what i want to do is

for example when i put this url in browser http://website1one.com/?123.html

it should generate this out put in browser

 

<iframe src="http://website2two.com/123.html" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

Link to comment
https://forums.phpfreaks.com/topic/252991-simple-help-needed/#findComment-1297147
Share on other sites

by using $_GET

 

<?php
$frame = $_GET['frame'];
if(isset($_GET['frame']) && $_GET['frame'] != ""){
?>
<iframe src="./<?php echo $frame;?>" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>
<?php
} else {
echo "no frame specified";
}
?>

 

usage would be to visit in the browser this type url

http://website1one.com/this-script-name/?frame=123.html

Link to comment
https://forums.phpfreaks.com/topic/252991-simple-help-needed/#findComment-1297156
Share on other sites

well it should really be this if are iframing from a different domain

 

<?php
$frame = $_GET['frame'];
if(isset($_GET['frame']) && $_GET['frame'] != ""){
?>
<iframe src="<?php echo $frame;?>" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>
<?php
} else {
echo "no frame specified";
}
?>

Link to comment
https://forums.phpfreaks.com/topic/252991-simple-help-needed/#findComment-1297164
Share on other sites

quite similar function :)

but it would be perfect if i can get the output i am desiring

http://website1one.com/this-script-name/?frame=123.html

should produce this code

<iframe src="http://website2two.com/123.html" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

 

your current script code is Just Making this url in iframe 123.html

can,t it put second domain in iframe including page 123.html

i have heard using str replace it can be done ?

by using $_GET

 

<?php
$frame = $_GET['frame'];
if(isset($_GET['frame']) && $_GET['frame'] != ""){
?>
<iframe src="./<?php echo $frame;?>" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>
<?php
} else {
echo "no frame specified";
}
?>

 

usage would be to visit in the browser this type url

http://website1one.com/this-script-name/?frame=123.html

Link to comment
https://forums.phpfreaks.com/topic/252991-simple-help-needed/#findComment-1297167
Share on other sites

This should be able to do a simple page your own site, or also from a url

 

<?php
if(isset($_GET['frame']) && $_GET['frame'] != ""){
$frame = $_GET['frame'];
} else {
$frame = "./";
}
?>
<iframe src="<?php echo $frame;?>" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

Link to comment
https://forums.phpfreaks.com/topic/252991-simple-help-needed/#findComment-1297168
Share on other sites

yes sir this code is working perfectly fine when i run this url

?frame=123.html

?frame=http://website2two.com/123.html

 

but i was wondering can this be done ?frame=123.html

should read as

 <iframe src="http://website2two.com/123.html" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

 

instead of website1one.com/123.html

This should be able to do a simple page your own site, or also from a url

 

<?php
if(isset($_GET['frame']) && $_GET['frame'] != ""){
$frame = $_GET['frame'];
} else {
$frame = "./";
}
?>
<iframe src="<?php echo $frame;?>" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

Link to comment
https://forums.phpfreaks.com/topic/252991-simple-help-needed/#findComment-1297169
Share on other sites

You can add the domain name to the iframe path.

 

<?php
if(isset($_GET['frame']) && $_GET['frame'] != ""){
$frame = $_GET['frame'];
} else {
$frame = "./";
}
?>
<iframe src="website1one.com/<?php echo $frame;?>" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

Link to comment
https://forums.phpfreaks.com/topic/252991-simple-help-needed/#findComment-1297171
Share on other sites

special thanks to quickoldcard very expert [quick responce]

and thank you drummin for your help

 

 

 

You can add the domain name to the iframe path.

 

<?php
if(isset($_GET['frame']) && $_GET['frame'] != ""){
$frame = $_GET['frame'];
} else {
$frame = "./";
}
?>
<iframe src="website1one.com/<?php echo $frame;?>" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%"></iframe>

Link to comment
https://forums.phpfreaks.com/topic/252991-simple-help-needed/#findComment-1297174
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.