Content Management Code

  Home arrow Content Management Code arrow Source Veiwer
CONTENT MANAGEMENT CODE

Source Veiwer
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2003-07-10

    Table of Contents:

     
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement
    You can veiw source of all files with this code
    urls you will get the html filenames you can get the php/mysql source code as well!
    UPDATED:
    I added validation

    By : cscartman

    <?php
    /*
    Setup:
    Copy the code insert it into any .php file and its ready!
    Blocking More Pages:
    If you want to block a file just put:
    $filename != "your file name" OR DIE("Your not allowed to veiw this code!");
    under //validation below and then people cannot veiw that code!

    */
    //main part of the file
    echo "<form action=$PHP_SELF method=post>Filename Or Url: <input type=text name=filename value=$filename size=50><br><br>";
    if($filename)
    {
    //validation
    $filename != "/ect/passwd/" OR DIE("Your not allowed to veiw this code!");
    //end validation



    @$contents = file_get_contents("$filename") OR DIE("No such file!");

    //displays file or urls source code if all goes well
    echo "<center><textarea rows=20 cols=90 name=text>$contents</text><br><br></form>";
    }



    ?>
    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Content Management Code Articles
    More By Codewalkers

    blog comments powered by Disqus

    CONTENT MANAGEMENT CODE ARTICLES

    - V2 CMS - Content Management System
    - VSNS Lemon
    - Country List For Forms Using SQL
    - eggblog
    - Table generation class
    - STP Simple Template Parser
    - class Vision_To_Form_Elements
    - Cascade Drop Down
    - Cura - CMS
    - Syntax Desktop
    - 216 color table
    - Simple Mini Poll class library (SimPoll)
    - Regex Generator
    - Siteseed
    - Company WebSite Builder PRO


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 2 - Follow our Sitemap