Gossamer Forum
Home : Products : DBMan : Customization :

Add Success - Access FTP Account, Upload File

Quote Reply
Add Success - Access FTP Account, Upload File
Can anyone help,

Thanks to a previous request for help the following code successfully writes an index.html file to the correct folder on our servers. But how do I get the same file to be uploaded to an external server via the customers FTP Account?

Current Working Code:

|;

{

&html_record_long(&get_record($in{$db_key}))

}

{

mkdir("$rec{'CustomerID'}",0755) ;

open(HTM, ">$rec{'CustomerID'}/index.htm");

select(HTM);

print qq| <HTML>

<HEAD>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<META NAME="description" CONTENT="$rec{'Description'}">

<META NAME="keywords" CONTENT="$rec{'Keywords'}">

<TITLE>$rec{'Title'}</TITLE>

</HEAD>

<FRAMESET ROWS="100%" border="0">

<FRAME NAME="main" SRC="$rec{'URL'}" MARGINHEIGHT=0 MAGRGINWIDTH=0 SCROLLING=AUTO NORESIZE>

<FRAMESET COLS="100%">

</FRAMESET>

</FRAMESET>

</html>

|;

close(HTM);


Quote Reply
Re: [RobR] Add Success - Access FTP Account, Upload File In reply to
I could be wrong but I'm not sure the script is able to send the file to another server via FTP.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Add Success - Access FTP Account, Upload File In reply to
Not speaking as an expert, I would be surprised if was possible to creat a script that would log in to a server in this way. Server security would probably prevent it.

But since you have created a file on your server, why doesn't your customer simply access that file? That is what networks are for.
-------------
David Olley
Anglo & Foreign International Limited,
http://www.firehelmets.co.uk

There are 10 types of people in the world: those who understand binary, and those who don't.
Quote Reply
Re: [davidolley] Add Success - Access FTP Account, Upload File In reply to
Hi

Thanks for your suggestions, but I may not have explained what I am trying to acheive.

As I said before the above mentioned script writes a file to our servers which provides either web forwrading or basic holding page for our clients domain names hosted on our servers. We have been asked many times if our clients using our current system could (if there FTP details are supplied for our server) upload the same or different holding page (index.html) to their other server.

Thanks