Jump to content

Web-Dev

Members
  • Posts

    1
  • Joined

  • Last visited

    Never

About Web-Dev

  • Birthday 08/15/1989

Contact Methods

  • AIM
    xDeadxBeatx
  • Website URL
    http://www.web-devs.com

Profile Information

  • Gender
    Not Telling
  • Location
    Maryland

Web-Dev's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Not a good idea to use GET, with get hackers or even anyone could use the passthru command to upload and file to your server, they could also view your servers password file which will include your username and password needed to login to your cpanel(or whatever your webhost uses). I reccomend using $_REQUEST['target'] and putting the following code into a file like grabpage.php then including grabpage.php(or whatever you called it) on the index page where you want the content to show up <?php $page = $_REQUEST['page']; if(eregi("[a-z0-9\-_\.]+", $page, $regs)) //make sure $page is alphanumeric { $dir = "includes/"; //not strictly necessary, can be blank. $ext = ".php"; //.php, .html, .txt, whatever if(file_exists($dir . $page . $ext)) { include($dir . $page . $ext); //or readfile if not expecting php code } else echo '404 - Not Found'; //or something similar } else echo 'Not a recognized page.'; ?>
×
×
  • 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.