PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have recently migrated my webserver to linux and in the process readfile does not work for urls anymore. I have a file called forcedownload.php which takes $filename and $name and downloads the filename url with the desired name. it looks like
<b>Warning</b>: readfile() [<a href='function.readfile'>function.readfile</a>]: php_network_getaddresses: getaddrinfo failed: Name or service not known in <b>/opt/lampp/htdocs/forcedownload.php</b> on line <b>15</b>
<b>Warning</b>: readfile(http://xpc/12-i_wayne-living_in_love-jah.mp3) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: Resource temporarily unavailable in <b>/opt/lampp/htdocs/forcedownload.php</b> on line <b>15</b>
The url is valid and once again this worked on my previous windows instillation perfectly.
<br />
<b>Warning</b>: readfile(http://10.107.1.117/Gorillaz/Gorillaz/14 Slow Country.mp3) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: HTTP request failed! <head>
in <b>/opt/lampp/htdocs/forcedownload.php</b> on line <b>15</b><br />