Jump to content

Get HTML page content after POST completed


Recommended Posts

How to get response form php page after form is submitted? php script have form which submits some data and then return some information. Is it possible to get this information?

Will this work

$oIE = _IECreate ("http://www.example.com/script.php")

$oForm = _IEFormGetObjByName ($oIE, "form_img-submit")

$oQuery = _IEFormElementGetObjByName ($oForm, "image")

_IEFormElementSetValue ($oQuery, $sPath)

_IEFormSubmit ($oForm)

_IELoadWait ($oIE)

$sText = _IEBodyReadText ( $oIE )

Link to post
Share on other sites

Get and use something like this ~

#include "IncWinHttp.au3"

MsgBox(0, "", HTTPSend(@ScriptDir & "stuff.zip"))

Func HTTPSend($File)
   Local $hOpen, $hConnect, $sRead, $hOpen = _WinHttpOpen(), $hConnect = _WinHttpConnect($hOpen, "website.com"), _
   $sRead = _WinHttpSimpleFormFill($hConnect, "Name_Of_PHP_Script.php", "index:0", "name:file", $File)
   _WinHttpCloseHandle($hConnect)
   _WinHttpCloseHandle($hOpen)
   Return $sRead
EndFunc   ;==>HTTPSend
Edited by THAT1ANONYMOUSEDUDE
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...