PHP et FTP

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
User avatar
WiZARD
Moderator
Moderator
Posts: 1256
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: PHP et FTP

Post by WiZARD » Tue Jul 02, 2002 1:01 am

bubbledee wrote:Bonjour!

J'ai un l?ger probl?me de FTP ! J'ai mis en ligne un outil en PHP pour administrer une page Web, permettant de modifier les images et les textes de la page. Pour modifier les images je propose ? l'utilisateur de pouvoir uploader des images de son disque sur vers l'h?bergement.

Mon probl?me c'est qu'une fois que le script est sur les serveurs de l'h?bergeur, mon FTP se retrouve en local et l'ordinateur de l'utilisateur n'est plus rien. J'ai essay? d'utiliser l'adresse IP de la machine mais sans succ?s!!!!

Est-ce que quelqu'un peut m'aider?

Merci d'avance!


Hi try typing via English or Russian, maybe then i can understad you....

User avatar
WiZARD
Moderator
Moderator
Posts: 1256
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: Translate....

Post by WiZARD » Tue Jul 02, 2002 3:35 am

bubbledee wrote:Hi !

Sorry, but I don't speak very well English....

I have got a problem with PHP and FTP !

I developp a Web Site to manage an other web Page. The user can change via this page, pictures and texts.
To change the picture : the user can select the new picture on a gallery.
So, via a form, the user can upload a new picture in a specific directory.

Problem : when the upload script is in the hosting, server FTP is the localhost and the user's computer is.....nothing.

I have try to use the id address of user and I don't want that the user install a server FTP.

How can I do ?


Wait a second, how remote FTP can localhost?
mayby IP adress of user....

try using of sessions and check permission on FTP.....
And oce again check FTP server config...
Mostly bug at websites cause error of permission on server....

User avatar
WiZARD
Moderator
Moderator
Posts: 1256
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Post by WiZARD » Tue Jul 02, 2002 6:02 am

bubbledee wrote:Yes, my script is stored on FTP Server, then when I want duplicate an picture file, the source is the user computer and the destination is exactly the FTP Server (local!!!!)


Wait a minute you want what than user click at image, this image saved at user hard disk?

User avatar
WiZARD
Moderator
Moderator
Posts: 1256
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

solution

Post by WiZARD » Wed Jul 03, 2002 3:39 am

bubbledee wrote:No I just want that a personn who use my script via Internet ( The script is on the web server) can choose a picture on her computer and this picture is directly upload on the server FTP. But the script is not run in the user's computer but, the script is on my web hosting !!!!


Look at this, very nice upload:
http://www.zachwhite.com/scripts.htm

also you can use session for open dir under yours rights and after end script close dir.

exaple of yours FTP login:

Code: Select all

$dirFTP='ftp://username:password@212.56.489.14/imagesdir';

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests