php - How can I programmatically upload values (web client) and get the result in a scenario such as the following? -
how able use webclient fill form such 1 ? http://www.willpeavy.com/minifier/
simple forms seems work 1 can't right. there way trigger php jobs called in page web client ? here code use normally.
private sub submitdata(data string) const url string = "http://www.willpeavy.com/minifier/" dim values new system.collections.specialized.namevaluecollection() values.add("html", data) dim webclient new webclient try dim responsebytes byte() = webclient.uploadvalues(url, "post", values) dim output string = system.text.encoding.utf8.getstring(responsebytes) console.writeline(output) catch ex exception messagebox.show(ex.message, "failure", messageboxbutton.ok, messageboximage.warning) end try end sub
so, if have input one
<!doctype html public "-//ietf//dtd html 2.0//en"> <html> <head> <title> small hello </title> </head> <body> <h1>hi</h1> <p>this minimal "hello world" html document.</p> </body> </html>
i end output one
<!doctype html public "-//ietf//dtd html 2.0//en"><html> <head> <title> small hello </title> </head><body> <h1>hi</h1> <p>this minimal "hello world" html document.</p> </body></html>
the interessing part in page source code
therefore, uploading value in vb.net "html" name , content want send value.
using fiddler, can see following: when using visual interface (web browser), jobs.php script called , update page desired output.
however, when using webclient, jobs.php script never triggered. below, fiddler view
can trigger job myself programmatically , if yes, how accomplish , result back.
another interessing fact note use of ifr variable in page script. can manually ensure set false ?
by way, aware there libraries minify code without relying on web page change or disappears without notice. more interested in programmatical interaction between .net , web. solution (or clues) involve other control webclient.
Comments
Post a Comment