Jump to content

GITs

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

About GITs

  • Birthday 02/12/1989

Contact Methods

  • Website URL
    http://www.l9ianime.com

Profile Information

  • Gender
    Male
  • Location
    Norfolk - Uk

GITs's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ok, I'm in need of a little bit of help with a piece of coding I'm doing. It is supposed to list the contents of a directory (easy enough) and allow the user to look at what is in the sub-directories aswell (also quite easy) The problem comes when I try to limit the user from going above the main directory... Here is what I have so far (please excuse the useless echo outputs, I'm using them for debugging purposes) <?php $up = 0; $base = "D:/AnimeUploaded/"; $pathworking = $_GET[path]; echo $pathworking."1<p/>"; if(strpos("/..",$pathworking)){ $pathworking = str_replace("/..","",$pathworking); $up = 1; } echo $pathworking."2<p/>".$up."up<p/>"; if($up == 1){ if($pathworking != ""){ echo "added<p/>"; $pathworking = $pathworking."/.."; } } echo $pathworking."3<p/>"; $dir = opendir($base.$pathworking) or die("Sorry, Unable to access that folder, please contact the administrator at l9ianime@gmail.com"); echo "Directory Listing of $base.$pathworking<br/>"; //running the while loop while ($file = readdir($dir)) { if(strpos($file, '.')){ echo "<a href='http://www.l9ianime.com/anime/".$pathworking."/".$file."'>".$file."</a><br/>"; } else{ echo "<a href='http://www.l9ianime.com/index.php?q=node/39&path=".$pathworking."/".$file."'>/".$file."</a><br/>"; } } //closing the directory closedir($dir); ?>
  2. Hi all... I'm using a php script to check that an imap connection exists... if it does, i want to re-direct to another page, written in ASP, for further processing. but this re-direct needs to contain post data for the asp page, GET is not an option due to security, and I dont want to use anything other than a base install of php (+extensions which are included in it) if possible... here is what i have so far. [code]<?php     $host = "{pastonexch01:143}";     $connection = imap_open($host, $_POST["user"], $_POST["pass"], OP_HALFOPEN);     if ($connection) {       imap_close($connection); $postdata="user=".$_POST["user"];       $da = fsockopen("careerslink.paston.ac.uk", 80, $errno, $errstr);       if (!$da) {           echo "$errstr ($errno)<br/>\n";           echo $da;       }       else {           $salida ="POST /login.asp  HTTP/1.1\r\n";           $salida.="Location: /login.asp\r\n";           $salida.="User-Agent: PHP Script\r\n";           $salida.="Content-Type: application/x-www-form-urlencoded\r\n";           $salida.="Content-Length: ".strlen($postdata)."\r\n";           $salida.="Connection: close\r\n\r\n";           $salida.=$postdata;   echo $salida;           fwrite($da, $salida);   echo ("worked :)");       }     }     else{     } ?> [/code] however, this will not re-direct to the next page... i have no idea why because im a php noob... hoping you can help me, ive been stuck on this for a while now... GITs
  3. hi there, i know i shouldnt be bumping an old topic, but could you tell me where you got the AR memberscript from, ive been looking for it for ages, and cant find it anywhere... i need an un-modified version of the original memberscripts...
×
×
  • 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.