Jump to content
Sign in to follow this  
COD3369

URL split for Header Responce

Recommended Posts

COD3369

#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

Share this post


Link to post
Share on other sites
FireFox

Hi,

Have you looked at the others String functions? >Help file.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
FireFox

What don't you understand with these functions, helpfile examples?

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
AutID
#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.

Share this post


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
Sign in to follow this  

×