[thelist] FTP / PHP

Mark Joslyn Mark.Joslyn at SolimarSystems.com
Thu Mar 25 13:26:48 CST 2004


Current Environment:

I have my PHP files on a paid ISP that dynamically writes out links to a
Document Repository on a local machine here in my office. That link is
passing through three variables to a forwarding PHP page that downloads the
file.

Sample Link:
www.abc.com/sending.php?DName=Name1&PName=Files/myFile.zip&dID=541

Sending.php has a command in it that connects to the FTP repository:

$myPage = "ftp://xx.xxx.xxx.xx/$xx/" . $DName . "/" . $PName;
header("Location: " . $myPage );

This method brings up the standard dialog box - Open in current Location,
Save, etc.. And is working great.

Now the dilemma:

We have set up FTP Server on a local machine here in my office. Now, instead
of the link downloading the ZIP file, I am getting an error message saying
that the server cannot be found - or DNS error. When I hardcode the link
(e.g. ftp://xx.xxx/xxx/xx/$xx/SamplePartner/TheFile.zip) and go directly to
that link (without the forwarding page) everything works.

Is there something I am missing that would keep me from grabbing the ZIP
files? Is the forwarding page trying to connect in a different method? Any
help would be appreciated.

Thanks,

markJ



More information about the thelist mailing list