mIRC Home    About    Download    Register    News    Help

Print Thread
#175343 21/04/07 10:20 AM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Does anyone know if it possible to upload an HTML page, directly with mIRC ?

I have for example, test.html in my mirc dir.
Can I make that available on my webspace?

Currently I use an FTP program to upload it manually.

Thanks in advance.

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
yep, you can create an ftp batch file to upload it.

make a file mircftp.bat and put the following lines in it...
Code:
@echo off
ftp -i -s:mircftp.upld
exit


then make a file mircftp.upld and put the followin glines in that...
Code:
ftp
open ftp.yourhost.com
yourftpusername
yourftppassword
cd /path/you/want
put C:\path\to\your\file.html
quit


then when you want to upload to your server use /run mircftp.bat

btk


billythekid
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can, of course, just put the bat command (just the second line) into a mIRC alias or other script.

There are also FTP scripts available.


Invision Support
#Invision on irc.irchighway.net
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Brilliant.

Working like a charm already.

Thanks a lot guys!

Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
To continue on this topic.
I've been using this .bat file for some time now, and it does seem to work well generally. But... laugh

...sometimes it seems to be unable to connect to my webspace (for whatever reason). The bot will proceed by displaying the programmed url once the timer has elapsed. Is there any way to make this script a little smarter?

For example, inform the user when the upload didnt proceed, and instruct them to send the command again. Also the ms-dos window doesn't close when the upload fails, so that would need to get closed also...

This is the current
Code:
on *:TEXT:!view*:#:{
  generate_page $2
  run mircftp.bat
  .timer 1 4 msg $chan 05The $2 list has been generated successfully. You can view the list here: 12http://user.provider.com/myspace/file.html
}

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
What you could do, not sure if it would even work but it's worth a shot. Is get an addon, snippet that downloads a file off of a website. And then check to see if the size of the file that you're uploading is different from the one you downloaded. Other than that I'm pretty clueless. smile


Link Copied to Clipboard