Jump to content

theironchef

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Posts posted by theironchef

  1. does anyone know how (htaccess possibly?) to deny a php script from accessing a parent directory. Heres the oflder structure

    /Home
      ----> /User 1/
                ----->index.php
                ----->image.jpeg
      ----> /User 2/
                ----->index.html

    I do not want index.php from user 1 to be able to open its parent diectory ".." and then end upopenidn user 2's files... anyone know how to prevent this? ???
  2. its all inthe source correct?

    jsut steal the source and have it search for what you want... heres something i've made to copy unreal tournament stats...

    [code]
    <?
    /// PLAYER STATUS

    $output = "";
    $lines = file('http://www.shadyserver.com/stats/?p=players&filter=games&sort=DESC');

    $linenumber = 0;

    // in the source the value is located between "center"> and Score.... that the score value to i copied it
    foreach ($lines as $line_num => $line)
    {
        $line = str_replace('<td class="grey" align="center">','Score:    ', $line);
        $line = str_replace('</td>', ' ', $line);
        $output.= htmlspecialchars($line)."<br>";
    }

    if($line_num == ($linenumber+3))
    {
        $line = str_replace('<td class="grey" align="center">','Frags:    ', $line);
        $line = str_replace('</td>', ' ', $line);
        $output.= htmlspecialchars($line)."<br>";
    }
    [/code]

    ... i dunno i wrote this a long time ago... you can see it work at my site www.shadyserver.com ... in the otp right of the page put in TheIronChef .... the code is shown on the right side of the page ...
  3. if you want to do work usign the variables done in the form after you hit submit try this in the top <?php section
    [code]
    <?php
    if($_POST['Calc'])
    {
        $name=$_POST['name']; // this gets the variable only after you hit submit

    }
    ?>
    [/code]

    help any? not sure what you are wanting to be honest  :-[
  4. I have done things liekt his in the past... im a n00b but i think the submit will refresh the page after it finished the code inside the submit button.  What i do is where the output should go in the actual page

    [code]
    <body>
    <? echo $code ?>

    </body>

    [/code]


    in the top php area after you submit jsut have it build the page adding to the string $code
    example

    [code]

    $code= "";

    $code.="<table border=0 cellspacing=2 cellpadding=1>
                <form name=delcomfnews action='".$_SERVER[PHP_SELF]."' method=post>
    <tr><td colspan=2 align=right><h3>Delete Comments - Step 1</h3>";


    [/code]


    Hard to explain but i've gotten it to work lol to be pissed if it doesnt work either :(
  5. ok. I am basically making a free unlimited hosting thing. I have it all setup and I give mysql databases, unlimite space, and unlimited bandwidth. I allow users to upload any kind of file blah blah. Is there a way I can stop them from runnign php scripts that can access parent directories jsut as my host does not allow me past my /home folder? I've tried runnign recursive php scripts myself to try testing and the scripts couldnt do anything beyond this folder. I wasnt the same affect for the users home folder. They can do whatevr they want int heir, but no further! HELP  ???
×
×
  • 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.