![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2005
Posts: 3
Rep Power: 0
![]() |
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..
![]() |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Apr 2005
Posts: 96
Rep Power: 4
![]() |
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. |
|
|
|
|
|
#3 | |
|
Hobbyist Programmer
Join Date: Aug 2005
Location: Hiding from... them...
Posts: 110
Rep Power: 4
![]() |
Quote:
@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. |
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Oct 2005
Posts: 3
Rep Power: 0
![]() |
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) |
|
|
|
|
|
#5 |
|
Professional Programmer
Join Date: Sep 2005
Location: serbia & montenegro
Posts: 484
Rep Power: 4
![]() |
Are you crazy man? No hacking here! He said: "You need to read the Forum Rules."
!@#$%^&*)(*^&%^ |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Oct 2005
Posts: 3
Rep Power: 0
![]() |
Its not that type of hacking ps2hacking is just the name of the site
![]() |
|
|
|
|
|
#7 |
|
Hobbyist Programmer
Join Date: Aug 2005
Location: Hiding from... them...
Posts: 110
Rep Power: 4
![]() |
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. |
|
|
|
|
|
#8 |
|
Expert Programmer
|
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.
![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|