Hi there.

I am looking to create a script in php that will get an image from an upload form and upload it to a site using ftp.
It needs to save the original image in the site images/full/ and also create a proportional image thumbnail (100x100) in images/thumb/
What is the simplest way to go about this?

EDIT: Oh just to mention i need to create a script, not use a web app :)

Hi,

You want a script and not use a webapp but then you say that you get a file from a form.

If you want to get a file from a webform:
You just Post the form to the server.
http://www.tizag.com/phpT/fileupload.php

Then use the ftp_put function of php to copy the file to the remote server:
http://www.php.net/manual/en/function.ftp-put.php


note: if you really dont want to use a webapp to upload the file, you can make a script that receives an argument with the name of the file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.