Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Using batch file to get html file?
New Posts  All Forums:Forum Nav:

Using batch file to get html file?

post #1 of 6
Thread Starter 
Can someone either post the appropriate commands to get a html/xml file from a website using command prompt and then save it to your computer?

I basically want to do the equivalent of the "view source" in any browser except through command prompt.

Thanks
    
CPUMotherboardGraphicsRAM
Intel Core I7 920 D0 @ 4.2GHz Asus P6T Deluxe V2 BFG GTX275 896MB Flashed to EVGA FTW! Mushkin HP3 1600Mh 6Gb 
Hard DriveOptical DriveOSMonitor
WD Black 500GB Samsung 22X DVD-RW Windowsw 7 Ultimate 64Bit Dynex 32Inch TV 
KeyboardPowerCaseMouse
Logitech Easy Call 750w Coarsair TX750 Thermaltake Armour Jr. Logitech Easy Call 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel Core I7 920 D0 @ 4.2GHz Asus P6T Deluxe V2 BFG GTX275 896MB Flashed to EVGA FTW! Mushkin HP3 1600Mh 6Gb 
Hard DriveOptical DriveOSMonitor
WD Black 500GB Samsung 22X DVD-RW Windowsw 7 Ultimate 64Bit Dynex 32Inch TV 
KeyboardPowerCaseMouse
Logitech Easy Call 750w Coarsair TX750 Thermaltake Armour Jr. Logitech Easy Call 
  hide details  
Reply
post #2 of 6
Not sure exactly what you are wanting. You want the actual html source to be saved or viewed within the command prompt? Or you simply want to be able to save an html file within command from any given website? Like type in a website address within command and have it save the file as an html? I don't know if there is one or not, I have never tried it. If you can't find a way, I can make an AutoIt script that will do what you need easily. Probably will lose/forget about this thread, so PM me if you get desperate and want to go the autoit route.
Edited by Strat79 - 5/1/11 at 9:50am
post #3 of 6
You can try using wget.
E.g.
Quote:
wget -qO- http://www.google.ca
It doesn't come with windows, so you'll need to download it.
http://downloads.sourceforge.net/gnu...11.4-1-bin.zip
CM HAF 932
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8400 P5Q-Pro Sapphire 4850 OCZ 2x2GB PC2-8500 
Hard DriveOptical DriveOSMonitor
2xWD 320GB Caviar Pioneer 215D Vista 64bit Samsung T200 
PowerCase
Enermax Infiniti 720W CM HAF 932 
  hide details  
Reply
CM HAF 932
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8400 P5Q-Pro Sapphire 4850 OCZ 2x2GB PC2-8500 
Hard DriveOptical DriveOSMonitor
2xWD 320GB Caviar Pioneer 215D Vista 64bit Samsung T200 
PowerCase
Enermax Infiniti 720W CM HAF 932 
  hide details  
Reply
post #4 of 6
I'd like to know exactly what is needing to be done. More details would be nice. Wget may work most likely, but not sure how efficient it will be at the task he needs. I can't figure out why the need for a batch file mainly. You wanting to put a certain number of predetermined addresses into the bat file and it auto save each address as html?
post #5 of 6
Thread Starter 
no basically my webhost doesn't allow connections to other servers and i need to get an xml file from my separate shoutcast server. So the idea is instead of running a application that i program here on my desktop i can just make a batch file and get it to pull data from the remote shoutcast server to my computer and then i can upload it up to my web host so that i can make a php script that will display the parse data and such.

Doing it through command prompt will be much better for a small task like that instead of making a locally run java program.
    
CPUMotherboardGraphicsRAM
Intel Core I7 920 D0 @ 4.2GHz Asus P6T Deluxe V2 BFG GTX275 896MB Flashed to EVGA FTW! Mushkin HP3 1600Mh 6Gb 
Hard DriveOptical DriveOSMonitor
WD Black 500GB Samsung 22X DVD-RW Windowsw 7 Ultimate 64Bit Dynex 32Inch TV 
KeyboardPowerCaseMouse
Logitech Easy Call 750w Coarsair TX750 Thermaltake Armour Jr. Logitech Easy Call 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel Core I7 920 D0 @ 4.2GHz Asus P6T Deluxe V2 BFG GTX275 896MB Flashed to EVGA FTW! Mushkin HP3 1600Mh 6Gb 
Hard DriveOptical DriveOSMonitor
WD Black 500GB Samsung 22X DVD-RW Windowsw 7 Ultimate 64Bit Dynex 32Inch TV 
KeyboardPowerCaseMouse
Logitech Easy Call 750w Coarsair TX750 Thermaltake Armour Jr. Logitech Easy Call 
  hide details  
Reply
post #6 of 6
If your webhost doesn't allow opening connections to other servers then it is time for you to change webhost.

With that being said, you can make a batch script to get the file and upload it to the ftp.
#well
(19 items)
 
Lenovo L530
(8 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7 4770k Gigabyte Z87X-UD4H XFX Radeon HD 6950 Corsair CMX8GX3M2A2000C9 
Hard DriveHard DriveOptical DriveCooling
Samsung EVO 840 Hitachi HDS722020ALA330 Generic DVD±RW Burner Noctua NH-D14 
OSMonitorMonitorKeyboard
Windows 8.1 Dell U2711 LG W2453 Ducky DK9008 Overclock.net Edition, Cherry MX B... 
PowerCaseMouseMouse Pad
Corsair TX850 Antec Three Hundred Corsair Raptor M40 QPAD HeatoN M 
AudioAudioAudio
E-MU Tracker|pre Beyerdynamic DT-770 250 Ohm AntLion ModMIc 
CPUGraphicsRAMRAM
Intel Ivy Bridge 3210M Intel HD 4000 Graphics Soldered Corsair Vengeance  
Hard DriveOptical DriveOSMonitor
500GB DVD-+RW Windows 7 Professional 1600x900 
  hide details  
Reply
#well
(19 items)
 
Lenovo L530
(8 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7 4770k Gigabyte Z87X-UD4H XFX Radeon HD 6950 Corsair CMX8GX3M2A2000C9 
Hard DriveHard DriveOptical DriveCooling
Samsung EVO 840 Hitachi HDS722020ALA330 Generic DVD±RW Burner Noctua NH-D14 
OSMonitorMonitorKeyboard
Windows 8.1 Dell U2711 LG W2453 Ducky DK9008 Overclock.net Edition, Cherry MX B... 
PowerCaseMouseMouse Pad
Corsair TX850 Antec Three Hundred Corsair Raptor M40 QPAD HeatoN M 
AudioAudioAudio
E-MU Tracker|pre Beyerdynamic DT-770 250 Ohm AntLion ModMIc 
CPUGraphicsRAMRAM
Intel Ivy Bridge 3210M Intel HD 4000 Graphics Soldered Corsair Vengeance  
Hard DriveOptical DriveOSMonitor
500GB DVD-+RW Windows 7 Professional 1600x900 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Using batch file to get html file?