Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

84 users online



hide code (php friendly?)

hide code (php friendly?)

Currently viewing this thread: 1 (0 members and 1 guests)


Plau

Plau

Neverside Newbie
Status: Offline!

hide code (php friendly?)

Hey,

I want to build a new site, and this time I need to use frames (shame on me Shocked ). Since I hate frames normally I don't know how to work with them propperly anymore... I heard it was a pain in the *** to work with the combination of frames + php...

What I want to do is the following, sometimes when I see a website I view the source to see how some things are done, but there are some sites that block the source by using frames. Normally you can get the info anyway, by entering the url + framepath, but not in all cases..

I've got an example from http://www.spelletjes.nl:

Code:


<html>
<head>
<title>Spelletjes.nl</title>
</head>
<frameset rows="60,*" frameborder="NO" border="0" framespacing="0">
<frame src="layout/header.php" name="topFrame" scrolling="NO" noresize >
<frameset rows="*" cols="166,*">
<frame src="layout/leftmenu.html" name="leftFrame" scrolling="NO" noresize>
<frameset rows="*,18" frameborder="NO" border="0" framespacing="0">
<frameset cols="*,36,0" frameborder="NO" border="0" framespacing="0">
<frame src="welkom/welkom.html" name="mainFrame">
<frame src="layout/rightmenu.html" name="rightFrame" scrolling="NO" noresize>
<frame src="chatbox/dummy.html" name="dummy" scrolling="NO" noresize>
</frameset>
<frame src="layout/footer.html" name="bottomFrame" scrolling="NO" noresize>
</frameset>
</frameset>
</frameset>
<noframes><body></body></noframes>
</html>

Could somebody show me how it's done? Or where I can find an example/tutorial?

And IS it possible to use normal php functions etc, like passing variables through to another page?

Thnx in advance!

MinDFreeZ

MinDFreeZ

Status: Offline!

Eek .. how is any of that hidden? .. You just said... that you just enter the URL... do that.
http://www.spelletjes.nl/layout/leftmenu.html
http://www.spelletjes.nl/layout/header.php
?

___________________

http://www.enhancedps.com/images/random/crap/sig.gif

Plau

Plau

Neverside Newbie
Status: Offline!

I mean the games, when you start playing a game and try to view that source. At least I can't find those paths

Avantasia

Avantasia

Neverside Newbie
Status: Offline!

Well, I don't speak dutch so I can't see if there are any other 'games' there, but I looked at 'hot shots' or something, and you can view the source. :S

It's just that it's a flash file, so it has no 'source', but if you download Firefox (I recommed you doing this anyway...I got it the other day and on the whole it seems to be a better browser than IE and Netscape) and you can view source by pressing ctrl+u.

And yeah you can pass variables and stuff from frame to frame.

You just include the variable in the url that you want to display in your frame.

Eg, if your main frame is index.php and it has two different contents...'introduction', and 'help', and if this is decided by a variable in the URL called 'content', your link in the TOP frame would be:

<a href="index.php?content=help" target="mainFrame">Need Help?</a>

...where mainFrame is the name of your....main frame. As for the whole hiding of code thing, it's not really possible to be honest. If you think about it, you're sending code to somebody's computer, if the software can read it, so can the user. That's a simple generalisation, but for basic IE users, they generally can't get passed the annoyance of frames. Also if you write really messy code they probably won't be able to read it anyway to find the links :P

Plau

Plau

Neverside Newbie
Status: Offline!

haha messy handwriting I can do Wink

I know it's not possible to hide it 100%, but I just think it looks nice, just to see 10 lines of code instead of 3729103790123 lines Wink

about the variable passing from frame to frame via the URL... the URL doesn't change on a frame-site does it?? So how can it be passed via the URL furthermore passing variables via the URL can be tricky when you're sending things like passwords...

Majjec

Majjec

Status: Offline!

Are you talking about how when you load up the source on a framed site the code is short? If so than your problem is this:

When you make a site with frames, you design each frame as if it were its own seperate page. You save it as different files. The index.html (or whatever url you enter to go to the framed site) is just an html file linking together other pages. So if we look at the code:

Code:

<frame src="welkom/welkom.html" name="mainFrame">
<frame src="layout/rightmenu.html" name="rightFrame" scrolling="NO" noresize>
<frame src="chatbox/dummy.html" name="dummy" scrolling="NO" noresize>

Then we see where frame magic (er...frame evil magic) does its work. When you're looking at spelletjes.nl/index.html, you are actually looking at layout/rightmenu.html, welkom/welkom.html, and chatbox/dummy.html. The index.html itself does nothing at al but tell your browser which pages have the code (and of course it controls frame placement.) So the site isn't hiding anything, its just that the webpage you see at index.html isn't in index.html at all. I hope that helped (I hope that was the problem.)

http://www.w3schools.com/html/html_frames.asp

___________________

http://www.nykoelle.com/tf/majjec.gif

Majjec

Majjec

Status: Offline!

As for the variable question.

Once the frames are loaded, they can be treated like individual webpages for the most part. If you have a link to an outside webpage and you click on it within a frame, the page will load in that frame.. (think of each frame as a seperate browser window or tab.) If you load up a dynamic php page in a frame, then sure you can change the url. Just like Avantasia said. YOu would just retrieve the variable in the targeted page using $GET[].

I don't see why you would be passing passwords around all the time. One post variable can be used to log in or create a new user and cookies can handle keeping the user logged in and such. I can't really help since I don't know the specifics. THis is a discussion for the serverside forum anyway.

___________________

http://www.nykoelle.com/tf/majjec.gif

Plau

Plau

Neverside Newbie
Status: Offline!

Majjec thnx for the attempt to explain, but I did know the frame part already (used to work with them a few years ago). The point is, on the site you see a flash game (or shockwave, depends on the game). The game is in non of the pages (that are in the frameset) defined.... That's my problem Smile

Natural

Natural

Status: Offline!

http://www.garfield.com/fungames/games/dingleballgame.swf

?!?

i just use opera. turn javascript off. viewed source and got the url for the game

oh the joy of opera

i could have done it in IE it would just have taken a bit longer

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0094 seconds.