"; echo varx(ftp_systype($_g['fhn'])); # echo varx(ftp_pasv($_g['fhn'],true)); echo varx(ftp_raw($_g['fhn'],'PWD')); echo varx(ftp_raw($_g['fhn'],'LIST -l .')); echo varx(ftp_raw($_g['fhn'],'mkd foobar')); echo varx(ftp_nlist($_g['fhn'],"-l .")); /* The following works but it has been integrated into the main code if (isset($_REQUEST['api'])) { $res=ftp_nlist($_g['fhn'],"."); foreach ($res as $fn) $ubigx[$fn]=1; # echo varx($res) . varx($ubigx); echo serialize($ubigx); exit(); } */ $titext="RHaworth.me$curdir directory listing"; rwhhead($titext,"http://rhaworth.me$curdir",""); ?>
Directory of: RHaworth.me$curdir\n 
"; if (strpos($_SERVER['SCRIPT_FILENAME'],'rhaworth.net')) { ?>
2013 Jan. I find that ucoz which hosts RHaworth.me is applying a very specific block: it refuses to return any results for ftp_nlist or ftp_rawlist if the request is coming from the IP address of RHaworth.net. But it still allows an mkdir command from that address! This block is presumably because rwhgal1.php (in oph_db.php) was issuing an nlist request every time it was entered.
\n"; $res=ftp_rawlist($_g['fhn'],"-a ."); varx($res); foreach ($res as $row) { # echo $row ."\n"; $perm= substr($row, 0,10); $isdir=(substr($perm,0,1)=='d'); $dirs= substr($row,11, 4); $size= substr($row,34, 8); $datim=substr($row,43,12); $stats=str_replace(' ',' ',"$perm$dirs$size $datim"); $name= substr($row,56); $ubigx[$name]=1; $newpath=$curdir .(strlen($curdir)>1 ? '/' : ''). $name; echo "$stats". ($isdir ? ' dir ' : '') ."\n" : "$newpath' target='_new'>") . "$name\n"; } ftp_close($_g['fhn']); $s_ubigx=serialize($ubigx); echo "\n\n". "\n". "\n\n"; flush(); if (strlen($curdir)>1) { # never any images in the home directory $_g['frhn']=ftp_connect($_g['cnf']['rh_net_urn']); $res=ftp_login($_g['frhn'],$_g['cnf']['rh_net_usnam'],$_g['cnf']['rh_net_uspas']); $tmpf_hn=fopen("tmp.txt","w+"); fwrite($tmpf_hn,$s_ubigx); fclose($tmpf_hn); ftp_put($_g['frhn'],"/httpdocs{$curdir}/remoim.txt","tmp.txt",FTP_ASCII); # $res=ftp_chdir($_g['frhn'],"/httpdocs$curdir"); # varx($res); # $res=ftp_rawlist($_g['frhn'],"-a ."); varx($res); ftp_close($_g['frhn']); } ?>