Jump to content

theironchef

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Everything 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. actually can you explain that a little... i want to do the exact same thing...
  3. 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 ...
  4. yea i added some more... the $pos ( it equals 1 btw) variable never changes so adding 2 always makes it 3....
  5. hmm odd... i ran ur script on my server and i added the echos in myself.... the $i value never chnaged form 3 the whole time... ill look into it ...  lemme know if u find out
  6. throw in some echos to see what looping indefintiely. Why ru incrmeenting $i by $pos+2 and not +1?
  7. lol i didnt even look at the code sry.... but the other guy how come you use mysql_fetch_assoc instead of his version of result? they both end up wokring the same way right? (im a n00b  :-[)
  8. isn't it because you have 2 " ` " characters in the string that  crashes it. Its finding substrings and you only want it to find one, but it returns 2 seperate one? possibly? i dunno lol
  9. wherever in the code you'd like  lol um say u wanted it here... [code] <body> <table> <? echo $name ?> </table> </body> [/code] u dig?
  10. 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  :-[
  11. can you post a little code? the loop and variables perhaps?
  12. yea but how would i do that Parent folder = 750       -> User1 folder = 666       -> User2 folder = 666 ...so forth... does this mean the users are stuck in their folder? I'm not good with these file permission numbers stuff. Anyone have a clue?
  13. 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 :(
  14. 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.