Download image every 24hrs + put it in php site


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Download image every 24hrs + put it in php site
# 1  
Old 01-31-2010
Download image every 24hrs + put it in php site

Hi everyone, I am all new to this and I might not know what I am asking about Smilie

I have access to a cPanel with cron tab scheduler. I know nothing re scripting creating php etc..

I own a ftp mainly for own email address, some storage, and a forum (ready-made one :P )

I have some knowledge and I learn fast (i think).

Right, what I would like is downloading an image from a website every 24 hours, give it a name with a date and time, plus put it in a php file so I can can see say 100 or 200 images, next to each other.

I've read something about cron, but I think I started from the middle Smilie

I will be grateful for your help guys. I believe it seems easy task, but not for me :/

Last edited by zYx; 04-05-2010 at 03:06 PM..
# 2  
Old 04-05-2010
There is an outline here of what you are trying to achieve:
PHP Save Images Using cURL | Edmonds Commerce Blog
We have always used the function file() for this and had to program some post-processing ourselves later.

Hope this helps
# 3  
Old 04-05-2010
Question

Quote:
Originally Posted by figaro
There is an outline here of what you are trying to achieve:
PHP Save Images Using cURL | Edmonds Commerce Blog
We have always used the function file() for this and had to program some post-processing ourselves later.

Hope this helps
Hi, thanks for the reply, but how do I apply it. Does it work with cron? More detail would be much appreciated.
# 4  
Old 04-07-2010
Yes, scripts should work with cron, or actually the other way around: cron invokes the script which then creates the result. There are plenty of resources on the use of cron here, so if you establish that your script works for a one-time download, you add it to the cron to have the image downloaded periodically.
# 5  
Old 04-07-2010
Thanks for your reply again, but like I said my knowledge in this subject is very limited or close to zero lol. I don't even know where to start with your script Smilie
# 6  
Old 04-08-2010
It is best if you start experimenting with cron jobs and the cron tab. Once you master that it is much easier to disentangle bugs of cron invoked scripts.
After learning cron, you can program your script and it shouldn't be very difficult to do given the many examples on the web. For instance you can start by first downloading a textfile from the web and then move to images that are stored with a certain naming convention. Sorry I cant be of much more help.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Visit site get data and put in file for use.

I need to go to "vpnbook"vpnbook.com on the web (can't put in name yet)and open "Openvpn" tab On that page I need to get the username:vpnbook and the next line password:???????? I need to put those two in line one and two of a file "pwfile" When I have those I need to open openVPN with the... (1 Reply)
Discussion started by: tytower
1 Replies

2. UNIX for Dummies Questions & Answers

How to download file protected by image captcha from command line?

Hello, any way to download file from image captcha download protected website? The download link is not static but session based, generated. I can do also via web browser, but i trust rather command line, maybe im wrong (1 Reply)
Discussion started by: postcd
1 Replies

3. Shell Programming and Scripting

Download dynamic generated image from HTML page

I've an HTML page where the pie chart is generated with google java code with the required input values in UNIX. The HMTL page is generated in UNIX and then when it loads in browser, the code is interpreted thought internet and the pie chart is generated. This is done by the java code in the... (4 Replies)
Discussion started by: Amutha
4 Replies

4. Shell Programming and Scripting

Download a site

A buddy of mine was telling me last night that you can write a bash script that will download an entire site in gedit?? Is this true??? I think I am going to fall in love with bash :D Any good tutorials?? (15 Replies)
Discussion started by: graphicsman
15 Replies

5. Shell Programming and Scripting

lftp script to connect to external sftp site and download to internal ftp and then send email

Hi there, I'm new to shell scripting and need some help if possible? I need to create a shell script (.sh) to run as a cron job on an ubuntu linux server to connect to an external sftp sites directory using credentials (which I have) and then download to our internal ftp server and then copy... (3 Replies)
Discussion started by: ghath
3 Replies

6. Shell Programming and Scripting

Wget, download file from site's folder.

Ok, this is quite weird. wget -r mysite.com/mylink/ should get all the files recursively from the 'mylink' folder. The problem is that wget saves an index.html file! When I open this index.html with my browser I realize that it shows all the files in the current folder (plus an option to move... (3 Replies)
Discussion started by: hakermania
3 Replies

7. Shell Programming and Scripting

Reconnect and download data from online site

Hi, I have to connect to online site and download some data from the online site but sometimes the site which i have to connect will be busy or it will not be working in such a case i have to connect atleast 3 times and try to download the data. I tried like this: use CGI::Carp... (2 Replies)
Discussion started by: vanitham
2 Replies

8. Linux

shell script to download files from a site?

Hey everyone, my wife has purchased a bundle package of a bunch of images from a site, and now has to download each one of them manually. There are about 500 downloads, and it's quite a hassle to browse to each page and download them all individually. I would like to write a shell script to... (2 Replies)
Discussion started by: paqman
2 Replies

9. Shell Programming and Scripting

script for download files from ftp site

I'm new to scripting. I'm trying to write a script to download files from ftp site, the following is the script and the message i get after running the script. no files were downloaded :( Thanks advance! script: #!/usr/bin/ksh DAY=`date --date="-1 days" +%y%m%d` ftp -v -n "ftp.address" <<... (5 Replies)
Discussion started by: tiff-matt
5 Replies
Login or Register to Ask a Question