For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > April 2006 > How to upload a file...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to upload a file...
Clark

2006-04-28, 6:56 pm

I have a VB program and part of the startup process is to download a
small text file containing the latest version number (so user can be
warned if an update is available). In addition to this I would also
like to upload serious error messages so I know when users are running
into problems. I am looking for an easy way to do this. My dowload code
uses "Temp$=Inet.OpenURL(URL$)" and this works fine. Is there an
equally easy way to upload a file or short text message? I have looked
through the Knowledgebase and checked into a couple of FTP examples but
have failed to get any of them to work. I can use Netscape to upload
the info (just drag and drop) but I would like my program to be able to
do the same. Anyone have suggestions on how I should proceed?

Clark Calkins, (junior) programmer

Veign

2006-04-28, 6:56 pm

If you have the proper permissions for FTP you can use this code as a
starting point:
http://www.veign.com/vrc_codeview.asp?type=app&id=77

If your site supports PHP, ASP, or ASP.NET it would simple enough to write a
script to process a special page URL that attaches the message to the Query
String like:
http://www.Domain.com/processmessage.asp?msg="this is the error"

This would let you do it if you don't want to embed the FTP information in
the application or you don't have rights for FTP.

If you go the FTP route make sure you encrypt everything in the application
and create a special FTP account with only permissions to a single upload
folder. Also, make sure the user is aware of this process as I always
remove applications that try and connect to the internet that have no
business doing so.

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
Veign's Blog
http://www.veign.com/blog
--


"Clark" <ccalkins@schaferlabs.com> wrote in message
news:1146260376.681473.92560@y43g2000cwc.googlegroups.com...
>I have a VB program and part of the startup process is to download a
> small text file containing the latest version number (so user can be
> warned if an update is available). In addition to this I would also
> like to upload serious error messages so I know when users are running
> into problems. I am looking for an easy way to do this. My dowload code
> uses "Temp$=Inet.OpenURL(URL$)" and this works fine. Is there an
> equally easy way to upload a file or short text message? I have looked
> through the Knowledgebase and checked into a couple of FTP examples but
> have failed to get any of them to work. I can use Netscape to upload
> the info (just drag and drop) but I would like my program to be able to
> do the same. Anyone have suggestions on how I should proceed?
>
> Clark Calkins, (junior) programmer
>



Larry Serflaten

2006-04-28, 6:56 pm


"Clark" <ccalkins@schaferlabs.com> wrote
> I have a VB program and part of the startup process is to download a
> small text file containing the latest version number (so user can be
> warned if an update is available). In addition to this I would also
> like to upload serious error messages so I know when users are running
> into problems. I am looking for an easy way to do this. My dowload code
> uses "Temp$=Inet.OpenURL(URL$)" and this works fine. Is there an
> equally easy way to upload a file or short text message? I have looked
> through the Knowledgebase and checked into a couple of FTP examples but
> have failed to get any of them to work. I can use Netscape to upload
> the info (just drag and drop) but I would like my program to be able to
> do the same. Anyone have suggestions on how I should proceed?


What about passing a small msg in the URL?

Msg = "?SysErr=5&MyErr=1202&UserID=32100123"
Temp$=Inet.OpenURL(URL$ & Msg)

The web page might access the Request object for the parameters and
store the values in a DB....

???
LFS


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com