Jump to content

_WinHttpSimpleFormFill "Connection problems" error


Herb191
 Share

Go to solution Solved by trancexx,

Recommended Posts

I have a pretty simple question (hopefully). Why am I getting a connection error and how do I fix it?

Thanks.

#include "WinHttp.au3"

$sPage = "/clientdb/PropertySearch.aspx?cid=1"

; Initialize and get session handle
$hOpen = _WinHttpOpen("Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.3; .NET CLR 2.0.50727; ffco7) Gecko/2008092417 Firefox/3.0.3")

; Get connection handle
$hConnect = _WinHttpConnect($hOpen, "propaccess.bellcad.org")

; gets page fine
;$sRead = _WinHttpSimpleRequest($hConnect, Default, $sPage)
;MsgBox(64, "test", $sRead)

; gets a "Connection problems" error when filling the form
;$sRead = _WinHttpSimpleFormFill($hConnect, "/clientdb/PropertySearch.aspx?cid=1", "name:Form1", "name:propertySearchOptions:ownerName", "Bob")
$sRead = _WinHttpSimpleFormFill($hConnect, "/clientdb/PropertySearch.aspx?cid=1", "index:0", "name:propertySearchOptions:ownerName", "Bob")
If @error Then
    MsgBox(64, "Error", @error)
Else
    MsgBox(64, "", $sRead)
EndIf

; Close connection handle
_WinHttpCloseHandle($hConnect)
; Close session handle
_WinHttpCloseHandle($hOpen)
Link to comment
Share on other sites

It should probably be more like this:

;...
$sRead = _WinHttpSimpleFormFill($hConnect, "/clientdb/PropertySearch.aspx?cid=1", "index:0", _
        "propertySearchOptions_ownerName", "Bob", _
        "propertySearchOptions_searchType", "Owner+Name", _
        "propertySearchOptions_taxyear", "2014", _
        "propertySearchOptions_propertyType", "All", _
        "propertySearchOptions_orderResultsBy", "Owner+Name", _
        "propertySearchOptions_recordsPerPage", "25")

;...

They use geoip check and block anyone outside US, so I can't check.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

It should probably be more like this:

;...
$sRead = _WinHttpSimpleFormFill($hConnect, "/clientdb/PropertySearch.aspx?cid=1", "index:0", _
        "propertySearchOptions_ownerName", "Bob", _
        "propertySearchOptions_searchType", "Owner+Name", _
        "propertySearchOptions_taxyear", "2014", _
        "propertySearchOptions_propertyType", "All", _
        "propertySearchOptions_orderResultsBy", "Owner+Name", _
        "propertySearchOptions_recordsPerPage", "25")

;...

They use geoip check and block anyone outside US, so I can't check.

 

Thanks for the response Trancexx. Unfortunately I still get the same error.

Link to comment
Share on other sites

  • Solution

This works for me (using some US proxy):

$sRead = _WinHttpSimpleFormFill($hConnect, "/clientdb/PropertySearch.aspx?cid=1", "index:0", _
        "propertySearchOptions_ownerName", "Bob", _
        "propertySearchOptions_searchType", "Owner Name", _
        "propertySearchOptions_taxyear", "2014", _
        "propertySearchOptions_propertyType", "All", _
        "propertySearchOptions_orderResultsBy", "Owner Name", _
        "propertySearchOptions_recordsPerPage", "25")

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

 

This works for me (using some US proxy):

$sRead = _WinHttpSimpleFormFill($hConnect, "/clientdb/PropertySearch.aspx?cid=1", "index:0", _
        "propertySearchOptions_ownerName", "Bob", _
        "propertySearchOptions_searchType", "Owner Name", _
        "propertySearchOptions_taxyear", "2014", _
        "propertySearchOptions_propertyType", "All", _
        "propertySearchOptions_orderResultsBy", "Owner Name", _
        "propertySearchOptions_recordsPerPage", "25")

That did it thank you. Just for further reference does _WinHttpSimpleFormFill always need to fill in all the fields on a form to work?

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...