I've got a problem with Safari I haven't been able to solve:
<?php
header("Location: ftp://username:[email protected]/somefile.zip");
?>
This code-snippet works in every browser (Fx, Chrome, IE7-9), but not in the latest Safari, which tells me that I don't have permission to view the page (that is, it redirects to the correct page [somedomain.org] with the correct protocol, but does not process the authentication data).
Interestingly it works when I copy it directly to the address bar or when I put in in an <a>
-tag an click on it. Is this a Safari bug, or am I missing something here, which the other browsers ignore? And if it's a Safari bug, is there some kind of workaround?
Safari does not support browsing FTP sites (displaying directory listings). Given a ftp: URL for a specific file, it will display or download it, but URLs for directories will be passed to the Finder instead.
Run the File Explorer on iPhone, go to its New Connection screen, scroll down to the button, you will see the Network Neighborhood section where your local FTP server can be detected automatically by the FTP client on iPhone. Tap on it, then log in using your computer login user ID and password.
Try:
header('HTTP/1.1 301 Moved Permanently');
header('Location: ftp://username:[email protected]/somefile.zip');
if it doesn't work try :
echo <<< EOF
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=ftp://username:[email protected]/somefile.zip">
EOF;
Or:
header ('Location: ftp://username:[email protected]/somefile.zip');
header ('Content-Length: 0');
The last solution I got from: http://www.ultrashock.com/forum/viewthread/90424/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With