Forum Moderators: open
If I use IE to upload by dragging and dropping the froogle.txt file it works fine and with no errors. It even gets published and is showing for the sites we did this way just fine.
However, I need to automate the process for all of our ecommerce users. So, I have a small very simple script that creates the upload file, runs ftp and send it to Froogle. It even sets the mode as PASV.
If I run that script (and the file it creates is exactly the same one that I use to test the upload using IE), Froogle tells me it sees a blank file.
If I run that script and use our ftp server here as the destination, our ftp server gets the file in tact and looking exactly like the source.
There is nothing wrong with the upload file 'cuz it works fine using IE as the upload program.
There is nothing wrong with the script because it uploads fine to our ftp servers.
There is something different about what the Froogle ftp server is looking for. I tried switching to Latin from UTF, changing delimiters, etc. but the thing still says Blank File.
I can manually do this for a while, but we have several dozen e-commerce users that we are doing this for and I want to put the script on their maintenance panels for a one click Froogle update. Otherwise we will need to teach all these people how to download the txt file and upload it manually using IE.
Any ideas? Anyone else have this process automated?
Thanks!
use Net::FTP;
my($server,$username,$userpass,$filedir,$filename,$dtype,$ftp);$server = "hedwig.google.com";
$username = "username";
$userpass = "password";
$filedir = "/";
$filename = "feedname.txt";
$dtype = "Ascii";$ftp = Net::FTP->new($server, Timeout => 6000) or print(" - Error: Cannot open FTP session\n");
$ftp->login($username,$userpass) or print(" - Error: Cannot Log In\n");
$ftp->cwd($filedir) or print(" - Error: Cant change directory\n");
if ($dtype eq 'Binary') { $ftp->binary(); }
$ftp->put($filename) or print(" - Error: Couldn't put file\n");
$ftp->quit or print(" - Error: Couldn't close the connection\n");
I run a batch file
ftp -s:E:/path/DosFtpFile.ftp hedwig.google.com
and then the ftp file
loginid
password
ASCII
put E:/path/froogleupload.txt
quit
The file uploads and appears in the folder but as zero bytes.
If I take the VERY SAME froogleupload.txt file and move it over using IE drag and drop, it works fine.
If I take the VERY SAME froogleupload.txt file and move it over using the very same DOS commands in the script MANUALLY, it works fine.
The script connects but sends a Zero byte file and I can't get a handle what would do this.
I'm using a ColdFusion call to run ftp xternally. I know the script works because it actually does work if I change the server and send to one of our ftp servers. It accepts the file from the script and it's perfect. It's just when this script want to talk to Froogle.
Thanks folks!
The server with the scripts needed a firewall trust relationship with hedwig. I don't know why the development server I was using did not need to have a specicfic trust. They are both using the same firewall and I know the dvlpmnt machine doesn't have an IP trust with hedwig, yet it still works. Each machine has port 21 open since we run ftp servers, port 80, 143, 110, 25 and a few other custom ports and that's it. One works and the other doesn't and they are both Win2K Adv Server. Go figure. ..... must be another MS feature.
Anyway .... it worked like a charm once I did that. I want to thank those that answered. The replies were useful.