Jump to content

Recommended Posts

Posted (edited)

#include "WinHttp.au3"

Opt("MustDeclareVars", 1)

Local $hOpen = _WinHttpOpen()
Local $hConnect = _WinHttpConnect($hOpen, "siteball.com")
Local $hRequest = _WinHttpOpenRequest($hConnect, Default, "/search.php")

_WinHttpSendRequest($hRequest)

_WinHttpReceiveResponse($hRequest)
Local $sHeader = _WinHttpQueryHeaders($hRequest)

_WinHttpCloseHandle($hRequest)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)


MsgBox(0, "Header", $sHeader)

I have Inputbox that contain: "http://www.siteball.com/search.php"

i dont wont to use

StringTrimLeft

becoz my url gonna change sometime..

what i want is split the url after first "/" from left and then

set the variable

$shost = "siteball.com"

$sFile = "/search.php"

so later i can use for display the exact header detail in msg box.

Edited by verma123
Posted
#include "WinHttp.au3"

Opt("MustDeclareVars", 1)

Local $hOpen = _WinHttpOpen()
Local $hConnect = _WinHttpConnect($hOpen, "siteball.com")
Local $hRequest = _WinHttpOpenRequest($hConnect, Default, "/search.php")

_WinHttpSendRequest($hRequest)

_WinHttpReceiveResponse($hRequest)
Local $sHeader = _WinHttpQueryHeaders($hRequest)

_WinHttpCloseHandle($hRequest)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)


MsgBox(0, "Header", $sHeader)

I have Inputbox that contain: "http://www.siteball.com/search.php"

i dont wont to use

StringTrimLeft

becoz my url gonna change sometime..

what i want is split the url after first "/" from left and then

set the variable

$shost = "siteball.com"

$sFile = "/search.php"

so later i can use for display the exact header detail in msg box.

You can create a var with the entire link and the split the url in mini vars so you can use them as you want.

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
×
×
  • Create New...