Есть код:
Использую так - всё ок:
Использую так - возвращает 0:
Код:
Func GetInfo()
Local $string = 'key=fffffffffff&sig=1287f7e41c7aecc70a63e3d7a142516f&method=getInfo&user=1234'
SendPhp( $string )
EndFunc
Func SendPhp($data)
Local $Response, $sMessage
Local $Serv[5]
$Serv[1] = '109.234.155.197'
$Serv[2] = '109.234.156.253'
$Serv[3] = '109.234.157.37'
$Serv[4] = '109.234.157.38'
Local $Host = $Serv[Int(Random(1,4))]
If Not Ping($Host) Then Return -1
Local $File = '/prison/universal.php'
Local $URL = 'http://' & $Host & $File
Local $PostData = $data
Local $oHTTP = ObjCreate('WinHttp.WinHttpRequest.5.1')
$oHTTP.Open('POST', $URL)
$oHTTP.setTimeouts(5000, 5000, 10000, 10000)
$oHTTP.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
Execute('$oHTTP.Send($PostData)')
If (@error) Or ($oHTTP.Status <> 200) Then
Return -1
Else
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
If Not $Response Then Return -1
EndIf
If Not $Response Then Return -1
Return $Response
EndFunc
Использую так - всё ок:
Код:
SendPhp('key=fffffffffff&sig=1287f7e41c7aecc70a63e3d7a142516f&method=getInfo&user=1234')
Использую так - возвращает 0:
Код:
GetInfo()