PDA

View Full Version : I want to do something on PHP3 that I saw on ASP. It is...


pulsorock
02-23-2000, 01:01 AM
I was surfing the net and found something that I would like to do on my site; the only problem is that I saw it on a page using ASP and I was wandering if it can be done on PHP3, because I wont like to use NT servers. The thing is that the site created a frame template and using the get command (?) to add an specific page inside the frame.
Example of the thing I'm referring to:
Here is the template for the frame: http://www.zonai.com/zonaitemplate.asp
Here is the URL for the document: http://endi.zonai.com/noticias/gentio/html/grammys22.html
Here is the ? part for the document inside the frame template:
http://www.zonai.com/zonaitemplate.asp?URLPATH=http://endi.zonai.com/noticias/gentio/html/grammys22.-html
That would bring me to the document page inside the frame template. This is using ASP, I want to do this using PHP3 (UNIX, of course :-) Would it be possible to do this?
I would really like to do this on my site, It will help resolve a lot of trouble I have using frames.

Thanks,
Guillermo Carrion
[This message has been edited by pulsorock (edited 02-23-00@12:04 pm)]

pulsorock
02-23-2000, 01:06 AM
The last link appeared wrong.. it supposed to be:
http://www.zonai.com/zonaitemplate.asp?URLPATH=http://endi.zonai.com/noticias/gentio/html/grammys22.--html

For some reason it adds an " - " before the last .html of the URL, that isn't supposed to be there

Hope there's a way to do this on PHP3

Thanks,
------------------
Guillermo Carrion
[This message has been edited by pulsorock (edited 02-23-00@12:09 pm)]

Jacob Stetser
02-23-2000, 07:15 AM
Ironically, the only ASP script I've ever written does this exact thing, and no, it's not for these guys. It's actually quite simple...

Make a file called enframe.php (or something like that), and put this in it:

<html>

<head>
<title>Frame</title>
</head>

<frameset framespacing=&quot;2&quot; border=&quot;0&quot; rows=&quot;40,*&quot; frameborder=&quot;0&quot;>
[nbsp][nbsp]<frame name=&quot;header&quot; scrolling=&quot;no&quot; noresize target=&quot;main&quot; src=&quot;Your header html is referenced here.&quot;>
[nbsp][nbsp]<frame name=&quot;main&quot; src=&quot;<?php print $src ?>&quot;>
[nbsp][nbsp]<noframes>
[nbsp][nbsp]<body>

[nbsp][nbsp]

This page uses frames, but your browser doesn't support them.</p>

[nbsp][nbsp]</body>
[nbsp][nbsp]</noframes>
</frameset>

</html>


And when you want to put a file into a frame, call it like this:
<a href=&quot;enframe.php?src=file_to_enframe.html&quot;>...</a>.

Voila!

As you can see, all I've done printed back out the variable src, which I passed in as part of the URL. You might want to add security, etc, if there's a possibility someone could use this to view a file they're not supposed to. But if[nbsp][nbsp]you use .htaccess or php authentication there's no problem.


------------------
icongarden.com/?fq (http://icongarden.com/?fq)
icongarden: making good ideas grow.

pulsorock
02-23-2000, 04:22 PM
Hello again Jacob,
How can I &quot;add security, etc, if there's a possibility someone could use this to view a file they're not supposed to.&quot; on the .htaccess or php authentication?
------------------
Guillermo Carrion

pulsorock
02-24-2000, 01:43 AM
Thank You very much Jacob.
It's been a great help.
------------------
Guillermo Carrion