How to get URL of a file in an HTTP GET request?

5,423

I don't think there's any other way of accessing the file. The PHP script probably just reads a private local file and redirects the data to the output stream.

This is probably done to prevent hotlinking. Because the PHP script has to be called in order to download the file, it can check certain things (for example if you're logged in) before streaming the data to the client.

If the script doesn't check anything (or only checks your IP address) and the program just denies the URL because it has no extension, you could try faking it:

http://www.example.com/index.php?file=12&hd=0&ext=.flv

By adding a dummy argument to the URL that makes it end in .flv the program might accept the URL.

Share:
5,423

Related videos on Youtube

Tsaleman
Author by

Tsaleman

Updated on November 26, 2022

Comments

  • Tsaleman
    Tsaleman over 1 year

    There's a web server that I access regularly by making an HTTP GET request like so: http://www.example.com/index.php?file=12&hd=0

    It returns an OK response with a content type of video/x-flv and various content lengths. Obviously this downloads a .flv file, and since I'm downloading it, it must be hosted on the web somewhere.

    However, I cannot figure out how to retrieve the direct URL of this file. I've tried using Wireshark and Fiddler4, but they don't help. I'm trying to get the URL so I can use it on Sync Video, which can accept direct URLs to video files. Trying a link like the example above doesn't work though.