Jump to content

HTTP Post problem


Recommended Posts

Hi Guys,

I'm trying to do a HTTP POST which would change a setting on my server. (details here, enable recordings etc.)

When I use the full URL via a browser it works fine, when I use the script below, it fails.

#include <http.au3>

$Host = "192.168.20.5"
$Port = "5000"
$File = "/ivr/PbxAPI.aspx"
$PostData = "func=upd_ext&extnum=3888&pwd=123456!&record_calls=0"

$Socket = _HTTPConnect($Host, $Port)
_HTTPPost($Host, $File, $Socket, _HTTPEncodeString($PostData))
_HTTPClose($Socket)

I assume I'm doing something wrong, I can't figure out what :-)

Any suggestions are appreciated.

Thanks!!

Link to comment
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
 Share

×
×
  • Create New...