English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a batch file - and I want to use it to save a webpage. The webpage will be PHP that'll generate itself as XML based on data in the database. All I want is for the batch file to be able to save (get) the generated text and store it somewhere. Rob

2007-03-04 16:08:49 · 3 answers · asked by Jawapro 3 in Computers & Internet Programming & Design

3 answers

if you want to capture the output from your php in a bat file you'll need a utility written in perl , using the libwww library called get or any variant of get!

get http://wherever.com/whatever.php>whatever.html

you could craft get using php too!

the previous telnet doesn't work well in a bat file unless you create a temporary text file with the get / command and 2 returns, then pipe it into telnet!

2007-03-04 16:53:29 · answer #1 · answered by jake cigar™ is retired 7 · 0 0

EDIT: Uh, magnificent Frederic, yet did you're trying operating the batch report? you receives this style of output: echo (consumer inputted call) a million>username.txt The textual content receives outputted, yet you've the better garbage displayed from that line. You forgot the @ in the front of the echo. :) in case you typed something like that from the command-line, it extremely works cleanly although. echo %route% > route.txt (I initially tried it with out the 'echo', so as that is why i could not get it to artwork.) EDIT 2: Oops, I pressed the incorrect button - I meant to provide Frederic a thumbs up. Sorry. -- no longer via a batch report. you'll opt for to write down a software to attempt this. in case you're utilising homestead windows, then you definately can study a thanks to apply homestead windows' outfitted-in seen undemanding scripting quite of batch files because VB script permits you to do many stuff and also you're not any more restricted to a console window.

2016-11-27 22:18:33 · answer #2 · answered by lacue 4 · 0 0

Use a telnet connection on port 80 and save the results.

For example,
telnet www.yahoo.com 80
get /

Will fetch the home page of yahoo.com. You can then save that data into a file.

The link below is to one of my answers about sending forms via batch, but it could easily be changes to getting pages.

2007-03-04 16:14:44 · answer #3 · answered by BigRez 6 · 0 1

fedest.com, questions and answers