Perl

Moderators: Jonathan
Number of threads: 1259
Number of posts: 3644

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Opening a dir on another domain Posted by davidrtg on 24 Nov 2003 at 8:29 AM
I'm trying to run an opendir function on another domains dir.
The following isn't working. Any ideas or can this be done at all?
opendir(THEDIR,"http://www.thedomain.com/imgblocks");
(@allimgfiles) = readdir THEDIR; closedir THEDIR;

When I go to http://www.thedomain.com/imgblocks I get a list of the files in the dir. You don't need any special permissions to view the dir, that I am aware of.

Thanks,
David
Report
Re: Opening a dir on another domain Posted by Jonathan on 24 Nov 2003 at 1:46 PM
: I'm trying to run an opendir function on another domains dir.
Unlikely to work, as it's for stuff accessible through the normal filesystem.

: The following isn't working. Any ideas or can this be done at all?
:
: opendir(THEDIR,"http://www.thedomain.com/imgblocks");
: (@allimgfiles) = readdir THEDIR; closedir THEDIR;
: 

: When I go to http://www.thedomain.com/imgblocks I get a list of the
: files in the dir. You don't need any special permissions to view the
: dir, that I am aware of.
You can't use opendir for doing stuff over HTTP. In fact, the index you see is just a generated HTML page. So my guess is that you need to grab that, then extract the data from it. Should be easy enough with pattern match and the g modifier.

Jonathan

###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Report
Re: Opening a dir on another domain Posted by davidrtg on 24 Nov 2003 at 2:04 PM
: : I'm trying to run an opendir function on another domains dir.
: Unlikely to work, as it's for stuff accessible through the normal filesystem.
:
: : The following isn't working. Any ideas or can this be done at all?
: :
: : opendir(THEDIR,"http://www.thedomain.com/imgblocks");
: : (@allimgfiles) = readdir THEDIR; closedir THEDIR;
: : 

: : When I go to http://www.thedomain.com/imgblocks I get a list of the
: : files in the dir. You don't need any special permissions to view the
: : dir, that I am aware of.
: You can't use opendir for doing stuff over HTTP. In fact, the index you see is just a generated HTML page. So my guess is that you need to grab that, then extract the data from it. Should be easy enough with pattern match and the g modifier.
:
: Jonathan
:
: ###
: for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
: (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
: /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
:
Yah, I didn't think that would be possible. Thanks for pointing me in the right direction Jonathan!

David




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.