-
-
Save m-thomson/c872e7da848ceba055ad036791daa32d to your computer and use it in GitHub Desktop.
<?php | |
// Note: Anyone could access your data if they guess this URL. You should remove this file from the server | |
// after importing or name it to something "unguessable". For even better security use an .htaccess rule. | |
// | |
// If you're experiencing problems you can uncomment the following line so errors will be sent to the file. | |
// ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); | |
// | |
// Enter the FTP (or HTTP) URL of your data file below. | |
$url = "ftp://username:[email protected]/full/path/to/file.csv"; | |
// These headers aren't strictly needed but can be helpful | |
header('Content-Type: text/plain'); | |
header('Content-Disposition: attachment; filename="ftp-proxy-data.txt"'); | |
header('Pragma: no-cache'); | |
// Fetch the file and echo it | |
readfile($url); |
m-thomson
commented
May 3, 2017
Danke
Hi Matt,
I ran into a use-case for the gist, and have tried implementing it, but no dice.
After I enter my version of the URL, and hit download, I get "Failed to download file..." followed by what I guess WP ALL Import error codes.
Not sure if you're still keeping up with this gist, or WP All Import for that matter, but any help would be appreciated.
To anyone reading this:
I haven't worked for the company that makes WP All Import in several years and I don't use their plugin currently (as I'm not doing WordPress work). So unfortunately, I won't be able to answer your questions.
However, the support the company offers is pretty great. In fact it's some of the best I've ever seen. I encourage you to reach out to them on https://www.wpallimport.com with any questions.
I am leaving these gists up however since they do seem to help some people.
Best of luck.
Mark