SourceForge has been redesigned. Learn more.
Close

#6 Support for the file:// scheme

open
nobody
None
5
2003-01-15
2003-01-15
No

It would be great if Snoopy supported the file://
method for getting. Doesn't seem like too much work
either...

Discussion

  • andrew morton

    andrew morton - 2003-01-15

    Logged In: YES
    user_id=229489

    at it's barest something like...

    case "file":
    $fp=fopen($URI_PARTS["path"], 'r');
    $this->results = fread($fp, $this->maxlength);
    fclose($fp);
    $this->status = 200;
    return true;
    break;

     
  • Nobody/Anonymous

    Logged In: NO

    this does seem like it could open up some security issues...
    perhaps using a ALLOW_FILE_SCHEME constant so that that the
    programmer has to enable this functionality...

     
  • Jason Pell

    Jason Pell - 2003-02-16

    Logged In: YES
    user_id=122222

    Hi,

    The 'file://' protocol is generally used for accessing
    resources available from the local drives available to the
    browser.

    Since Snoopy runs on the server would not be available...

    Are you wanting to use the file:// scheme to access files on
    the server itself?

    Thanks
    Jason

     
  • andrew morton

    andrew morton - 2003-02-16

    Logged In: YES
    user_id=229489

    Exactly, it would provide a uniform way to access local and
    remote files from PHP. I'm interested because MagpieRSS uses
    your script to retrieve and then parse RSS files. In my case
    all the files are located locally on the server so I hacked
    in support for opening the files so I didn't have to put the
    load on the webserver.

    I'm not sure what direction your project is heading but it
    seemed to that adding file support would be a simple but
    very functional feature to add.

     
  • Jason Pell

    Jason Pell - 2003-02-17

    Logged In: YES
    user_id=122222

    Hi,

    Just to make it clear, I have no relationship to this
    project, except as a user of snoopy.

    I was just interested in what you wanted to use this feature
    for.

    I myself think that it is probably a bit out of the area for
    which snoopy was designed, but thats up to the developers.

    Cheers
    Jason

     

Log in to post a comment.