Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 7th, 2005, 7:35 PM   #1
747
Newbie
 
Join Date: Oct 2005
Posts: 3
Rep Power: 0 747 is on a distinguished road
Help please

Hey guy's im making a prog and it's simple but, i need the code line im not sure what it is, the program is when you click a commad button it will download a txt file to your desktop or hard drive for example a site like this will be in the coding www.wtfever.com/LOLROFL.txt --- it will download this text file to your desktop when you click the button help..
747 is offline   Reply With Quote
Old Oct 7th, 2005, 7:54 PM   #2
crazykid48x
Programmer
 
crazykid48x's Avatar
 
Join Date: Apr 2005
Posts: 96
Rep Power: 4 crazykid48x is on a distinguished road
that link doesnt work for me. What language are you using?
__________________
I had my portable CD player, and took it in the bathroom with me while I went to pee. And the second I whipped my penis out, the theme song to 'Rocky' started playing. I've never felt more manly than in that moment.
crazykid48x is offline   Reply With Quote
Old Oct 7th, 2005, 8:26 PM   #3
Silvanus
Hobbyist Programmer
 
Silvanus's Avatar
 
Join Date: Aug 2005
Location: Hiding from... them...
Posts: 110
Rep Power: 4 Silvanus is on a distinguished road
Quote:
Originally Posted by crazykid48x
that link doesnt work for me. What language are you using?
Presumably Visual Basic.

@747: There are some of problems with this post. To enumerate:

1) The title: "Help Please" is not even remotely close to a good description of your topic.

2) You haven't shown the code you have. We can't help you get where you want to go unless we see where you're starting from.

You need to read the Forum Rules.
Silvanus is offline   Reply With Quote
Old Oct 7th, 2005, 9:32 PM   #4
747
Newbie
 
Join Date: Oct 2005
Posts: 3
Rep Power: 0 747 is on a distinguished road
Ohh damn i forgot lol, vb.6 and heres a pic of the layout:

So what i want to do is when i hit download takes the sites txt file that i put in and it saves it to my desktop.

I tried this didnt work it didnt download the file and it didnt save:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _ 
    "URLDownloadToFileA" ( ByVal pCaller As Long , ByVal szURL As String , _ 
    ByVal szFileName As String , ByVal dwReserved As Long , _ 
    ByVal lpfnCB As Long ) As Long 

'this will download the file onto the local harddrive 
Dim iReturn As Long 
iReturn = URLDownloadToFile(0, " http://www.domain.com/filename.txt " , "c:\localfile.txt" , 0, 0)
747 is offline   Reply With Quote
Old Oct 8th, 2005, 3:09 AM   #5
ivan
Professional Programmer
 
ivan's Avatar
 
Join Date: Sep 2005
Location: serbia & montenegro
Posts: 484
Rep Power: 4 ivan is on a distinguished road
Are you crazy man? No hacking here! He said: "You need to read the Forum Rules."

!@#$%^&*)(*^&%^
ivan is offline   Reply With Quote
Old Oct 8th, 2005, 8:57 AM   #6
747
Newbie
 
Join Date: Oct 2005
Posts: 3
Rep Power: 0 747 is on a distinguished road
Its not that type of hacking ps2hacking is just the name of the site
747 is offline   Reply With Quote
Old Oct 8th, 2005, 9:03 AM   #7
Silvanus
Hobbyist Programmer
 
Silvanus's Avatar
 
Join Date: Aug 2005
Location: Hiding from... them...
Posts: 110
Rep Power: 4 Silvanus is on a distinguished road
Yeah, PS2 hacking is legal. Warranty-violating, perhaps, but legal.

As to your question: I'm assuming that if you want it to download when you click the download button, you've got to use the TextBox in your function call instead of "http://www.domain.com/filename.txt". Other than that, I don't kow- I'm not really a VB person.
Silvanus is offline   Reply With Quote
Old Oct 8th, 2005, 9:29 AM   #8
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
The URLDownloadToFile is actually an Internet Explorer API that most of the time doesn't seem to work anyway, and varies between versions. I would suggest using the winsock control / api, establishing a TCP connection on port 80, and sending a GET request, which would be a lot more reliable, and doesn't rely on IE. There's probably code out there that'll do that already, but its not complicated to do yourself.
Rory is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:01 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC