Hotlink Script

Posted on 2006-04-26
Last Modified: 2013-12-25
I need a perl script which allows me to give users a hotlink to any type file.

The kind of setup would be along the lines of:

The script must allow me to specify a path to a particular directory.

so if the user then adds the hotlink into an html page like:

<img src="" alt="Big Boat">

the picture can be seen.

and if they put it into a hyperlink like

<a href="">Download Now</a>

the file can be downloaded.

etc... etc...

Can you post the source if you have a solution.


Question by:spiroosx
    1 Comment
    LVL 51

    Accepted Solution

    hmm, that's a simple task to implement in your favorite programming language:
      1. read supplied variables
      2. do a good input data validation on the values of these variables
      3. read the specified resource
      4. send the read data on stdout prepended by a proper HTTP header
      5. install the program on your web server
      6. ready, enjoy

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
    I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    The viewer will learn how to dynamically set the form action using jQuery.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now