Jump to content

Referencing A Url


gever1010

Recommended Posts

I have a question about syntax. I have an html anchor that calls a php file, while passing a file name. It works just as intended when it looks like this:

 

<a href="http://www.mysite.com/direct_download.php?file=uploads/myfile.mp3">Download</a>

 

But my mp3 files are on another server, so I want to reference the file using the url. Can I do that? It doesn't seem to work. Example:

 

<a href="http://www.mysite.com/direct_download.php?file=http://www.myserver.com/uploads/myfile.mp3">Download</a>

 

Ideas? Am I missing quotes or something in particular to be able to read it as a URL?

Link to comment
https://forums.phpfreaks.com/topic/270479-referencing-a-url/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.