ok, guys, i have a problem. I have a php script that logs into a third party ssl "https" server, constructs a URL for a file download. I need to know if it is possible to download the file locally onto my server, and then display it to the user from my server.

If i construct the URL, and direct link it to the user, the user isn't able to access it since he isnt logged into the ssl website (i.e. only me server is) - so since my server is logged in, i want it to download the file, so the user will be able to access it without logging in. The URL is something like: https://www.abc.com/x/y/z/1 -----> this URL gives me a PDF file if im logged in.

Hope this makes sense. Any help would be appreciated. Thanks

    Sure, use the PHP cURL Library. Here's another website with examples. Here's a php class that abstracts many of the functions for cleaner and potentially easier code.
    Once you download the file via cURL, you can store it on your server for download to your clients.

      6 days later

      for some reason, using curl forwards me to the file ... if im logged into the site, i'm shown the file, if im not logged in, it asks me to log in ... curl doesnt download the file !

        Write a Reply...