Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Url link question????

    Hi, I have a script that generates and sends an email to a user. In this email, I want a generated link for the user to be able to click on and download a file. Here is my problem, my server doesn't allow files over 2MB to be hosted so the files are actually stored on a diferent server on the internet which is a "file hosting server" only, but the email php script is on my server. Here is what I mean:
    Example 1: www.mysite.com
    Example 2: www.hosted_file_site.com/filename.zip

    So what I need is some code that I can add to my email script that will generate the download link while protecting the file's actual location and it's host location. Since I am very, very new at php could you please show me some code to do this with, please?

    Thanks!
    Last edited by ArcGames; 06-23-2006 at 09:29 AM.

  • #2
    Regular Coder
    Join Date
    Sep 2005
    Posts
    394
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hrmmm, tricky. You would have to use http://uk2.php.net/manual/en/function.readfile.php but, I don't think readfile allows cross server. You'd have to share databases between the 2 servers and use readfile on the file hosting one.

    In summary, not very easy and requires thought.

    ~Phil~

  • #3
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Its not working. Please I need help?

  • #4
    Regular Coder
    Join Date
    Mar 2005
    Posts
    114
    Thanks
    4
    Thanked 3 Times in 3 Posts
    The problem here is that in order to download a file the user would have to go to the file itself, no matter where it is hosted. I don't know if you will be able to completley hide this link, but there may be some ways to mask it. For example, try having the link in the email to your site, and then add a redirect over to the files site. This isnt that good of a solution though because it would be in the address bar of the browser... maybe use javascript to pop up a new window without the adress bar. Again only a half hjearted answer, but to completley hide it would require some complex coding.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •