I tried to put it in code and because I had less than 5 posts I wasn't able to use URLs here on forums, so I'm gonna try now:
get -t inf http://www.somesite.com/webcam.jpg ftp://UserName@MyDomain.net:Password@ftp.MyDomain.net
Ok it works now, so it should be clearer for you.
i also tried this:
get -t inf http://www.somesite.com/webcam.jpg ftp://UserName@MyDomain.net:Password@ftp.MyDomain.net/public_html/yyy/
but it would still be saved to the root.
Just so you know that I am not really a unix person, I've always worked with windows, and currently have win7, but it hasn't got anything to do with windows since the CronTab I'm trying to use is in my cPanel on my hosting account. I believe this is unix technology and this is where the problem starts ;]
Another thing, all these JPG files have the same name, so every time a new JPG is being downloaded, numbers are added to the end of the file name. I.e. IMAGE.JPG.1, IMAGE.JPG.2 etc... Is there any chance to change the name to IMAGE.1.JPG or something like that?
Also, with every single JPG file, a HTML files are being downloaded or.. created. Index.html.1, Index.html.2 etc.. which contains the following:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Index of /yyy/y</TITLE>
</HEAD>
<BODY>
<H1>Index of /yyy/y</H1>
<PRE><IMG SRC="/icons/blank.gif" ALT=" "> <A HREF="?N=D">Name</A> <A HREF="?M=A">Last modified</A> <A HREF="?S=A">Size</A> <A HREF="?D=A">Description</A>
<HR>
<IMG SRC="/icons/back.gif" ALT="[DIR]"> <A HREF="/yyy/">Parent Directory</A> 03-Nov-2010 11:22 -
</PRE><HR>
<ADDRESS>Apache/1.3.37 Server at MyServer.net Port 80</ADDRESS>
</BODY></HTML>
The /yyy/y/ are just a testing folders in /home/user/public_html/yyy/y/.
Don't know what the "/icons/back.gif" is:confused:
I also get emails every time cron runs:
--01:29:01-- http://somesite.com/webcam32.jpg
=> `webcam32.jpg.24'
Resolving www.somesite.com... 195.173.130.149 Connecting to www.somesite.com|195.173.130.149|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21,470 (21K) [image/jpeg]
0K .......... .......... 100% 165.31 KB/s
01:29:02 (165.31 KB/s) - `webcam32.jpg.24' saved [21470/21470]
--01:29:02-- ftp://user:*password*@ftp.MyServer.net/public_html/yyy/
=> `.listing'
Resolving ftp.MyServer.net... 193.218.153.71 Connecting to ftp.MyServer.net|xxx.xxx.xxx.71|:21... connected.
Logging in as User ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /public_html/yyy ... done.
==> PASV ... done. ==> LIST ... done.
0K 589.90 KB/s
01:29:02 (589.90 KB/s) - `.listing' saved [119]
Removed `.listing'.
Wrote HTML-ized index to `index.html.6' [236].
FINISHED --01:29:02--
Downloaded: 21,470 bytes in 1 files
Though, the file is still saved in the root, not in public_html/yyy.
When i used /home/user/public_html/ instead of ftp login details, the email came saying:
/home/user/public_html/: Unsupported Scheme
along with the rest of the emails, similar to the one above... whatever that means.
Tried googling it, but couldn't find anything related to my particular "issue" :]