Allowing scripted file downloads (e.g. wget or curl)

Discussion in 'Setting-up protection' started by mcfiddish, Aug 20, 2011.

  1. mcfiddish

    mcfiddish New Member

    Joined:
    Aug 20, 2011
    Messages:
    5
    I installed the trial version of aMember and I think it does everything I want. I have files I want to protect that are updated frequently. I want my users to be able to retrieve these files without going through a web interface. I know that using simple HTTP Authentication with an .htaccess file will work, as clients like wget and curl can pass usernames and passwords to the server.

    However, this doesn't allow me to see any information that isn't in the regular apache logs. Is it possible to use the php include methods to allow access using clients that are not web browsers?

    I can live with HTTP authentication, but it would be nice to be able to check the username and IP at the time of download to ensure that accounts are not being shared. Otherwise I can schedule a cron job to check the logs for this kind of thing.

    Thanks!
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    This can be done but will require customization. In short you will need to create script that will accept login/password/path to file through GET, check login/password and if user is ok, output file with correct headers.

Share This Page