Ask a Question related to PHP Development, Design and Development.
-
Jane #1
How can I auto upload a file to the server?
I have a .txt file on my local Windows 2000 box that i want uploaded to a
remote L.A.M.P. server with only one click.
I want to have a link (shortcut) on my desktop when clicked it launches a
web browser loaded with a remote .php script that automatically goes into
C:\data\upload_me.txt and uploads "upload_me.txt"
I know how to upload files using php with a "browse to file" html form, but
i want to skip the form and have the file just upload automatically when the
script is loaded.
I don't know how to make the .php script automatically grab the file from my
local box and upload it without any user intervention.
Any suggestions?
Thanks for you help,
cheyrl.
Jane Guest
-
file upload is killing my server with large files
I am using a cffile to upload files to a directory on my server. I have my memory up to a gig on the java settings on the cold fusoin admin. I have... -
upload .mdb file to server
Hello! Is there anyone to help me with my database problem? I'm uploading the database file (Ms Access file) but when I'm trying to put a a log in... -
[PHP] How can I auto upload a file to the server?
But, as we all know, PHP doesn't run client side, so she'd have to turn her computer into a web server or run PHP from the command line. There... -
Is it possible to upload a file from Director to a web server?
I've not used Director before, so apologies in advance if this is a very straightforward question. We are considering Director for a project where... -
Upload local file to server
Is there an easy way to upload a local file to a server? -
Raditha Dissanayake #2
Re: [PHP] How can I auto upload a file to the server?
Hi,
The exact mechanism you mentioned cannot be easily created with php.
What you can do is the install PHP command line version on your system
and upload directly with that using a php script completly bypassing the
browser. In that case though you will need to create write the post data
using your own script.
In other words your php script opens the upload_me.txt files, opens an
http connection to the server and writes the contents of the file as
multipart/form-data. The browser does not come into the picture.
all the best
jane wrote:
>I have a .txt file on my local Windows 2000 box that i want uploaded to a
>remote L.A.M.P. server with only one click.
>
>I want to have a link (shortcut) on my desktop when clicked it launches a
>web browser loaded with a remote .php script that automatically goes into
>C:\data\upload_me.txt and uploads "upload_me.txt"
>
>I know how to upload files using php with a "browse to file" html form, but
>i want to skip the form and have the file just upload automatically when the
>script is loaded.
>
>I don't know how to make the .php script automatically grab the file from my
>local box and upload it without any user intervention.
>
>Any suggestions?
>
>Thanks for you help,
>cheyrl.
>
>
>
--
[url]http://www.radinks.com/upload[/url]
Drag and Drop File Uploader.
Raditha Dissanayake Guest
-
Jason Sheets #3
Re: [PHP] How can I auto upload a file to the server?
You might look at SCP using the PuTTY SCP or another SSH client to
securely upload the file. You could automate it in a batch file and
make a short-cut to the batch file. Doing this over the web is not a
good method like John said. If you use SCP you can setup an SSH key so
that you are not prompted for a password, SCP was designed for this type
of problem.
Jason
John W. Holmes wrote:
> jane wrote:
>>>> I have a .txt file on my local Windows 2000 box that i want uploaded
>> to a
>> remote L.A.M.P. server with only one click.
>>
>> I want to have a link (shortcut) on my desktop when clicked it
>> launches a
>> web browser loaded with a remote .php script that automatically goes
>> into
>> C:\data\upload_me.txt and uploads "upload_me.txt"
>>
>> I know how to upload files using php with a "browse to file" html
>> form, but
>> i want to skip the form and have the file just upload automatically
>> when the
>> script is loaded.
>>
>> I don't know how to make the .php script automatically grab the file
>> from my
>> local box and upload it without any user intervention.
>
> You can't. That would be a horrible security violation. Think of a
> different method.
>Jason Sheets Guest
-
Raditha Dissanayake #4
Re: [PHP] How can I auto upload a file to the server?
Hi John,
My Impression from Jane's mail was that she was thinking of using a PHP
script on the client side and not the server side. Am i correct jane? If
so there would not be security concerns. Obviously as john has so
rightly pointed out php on the server side cannot access local files.
The only effective way then would be to use signed java applets (which
contrary to popular belief can access local files if you give it the
right permissions)
John W. Holmes wrote:
> jane wrote:
>>>> I have a .txt file on my local Windows 2000 box that i want uploaded
>> to a
>> remote L.A.M.P. server with only one click.
>>
>> I want to have a link (shortcut) on my desktop when clicked it
>> launches a
>> web browser loaded with a remote .php script that automatically goes
>> into
>> C:\data\upload_me.txt and uploads "upload_me.txt"
>>
>> I know how to upload files using php with a "browse to file" html
>> form, but
>> i want to skip the form and have the file just upload automatically
>> when the
>> script is loaded.
>>
>> I don't know how to make the .php script automatically grab the file
>> from my
>> local box and upload it without any user intervention.
>
> You can't. That would be a horrible security violation. Think of a
> different method.
>
--
[url]http://www.radinks.com/upload[/url]
Drag and Drop File Uploader.
Raditha Dissanayake Guest
-
Cpt John W. Holmes #5
Re: [PHP] How can I auto upload a file to the server?
From: "Raditha Dissanayake" <jabber@raditha.com>
True, kind of, and that's how I understood it also. But, as we all know, PHP> My Impression from Jane's mail was that she was thinking of using a PHP
> script on the client side and not the server side. Am i correct jane? If
> so there would not be security concerns. Obviously as john has so
> rightly pointed out php on the server side cannot access local files.
doesn't run client side, so she'd have to turn her computer into a web
server or run PHP from the command line. There still isn't a way to
automatically submit a file over HTTP using either method, though.
FTP would work, though...
---John Holmes...
> John W. Holmes wrote:
>>> > jane wrote:
> >> >> >> I have a .txt file on my local Windows 2000 box that i want uploaded
> >> to a
> >> remote L.A.M.P. server with only one click.
> >>
> >> I want to have a link (shortcut) on my desktop when clicked it
> >> launches a
> >> web browser loaded with a remote .php script that automatically goes
> >> into
> >> C:\data\upload_me.txt and uploads "upload_me.txt"
> >>
> >> I know how to upload files using php with a "browse to file" html
> >> form, but
> >> i want to skip the form and have the file just upload automatically
> >> when the
> >> script is loaded.
> >>
> >> I don't know how to make the .php script automatically grab the file
> >> from my
> >> local box and upload it without any user intervention.
> >
> > You can't. That would be a horrible security violation. Think of a
> > different method.
> >
>
> --
> [url]http://www.radinks.com/upload[/url]
> Drag and Drop File Uploader.
>
> --
> PHP General Mailing List ([url]http://www.php.net/[/url])
> To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]
>Cpt John W. Holmes Guest
-
Mike Migurski #6
Re: [PHP] How can I auto upload a file to the server?
>The only part i am having trouble with is making the remote script
<snip>>automatically look into the local computer's hard drive and grab the .txt
>file.
You're out of luck - for security reasons, the file input widget is>The problem with the code above is the path to the file does not show up
>in the <input type='file'>, and the user would still need to click on the
>'submit button' to upload the file.
intentionally resistant to scripting/styling.
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca [url]http://mike.teczno.com/contact.html[/url]
Mike Migurski Guest



Reply With Quote

