Jump to content

Receive Url from "_INetGetSource"


 Share

Recommended Posts

hey there i receive a sourcecode from a webpage with "_INetGetSource",

due to the redirect in the startingurl the ending url isn´t the starturl i throw

in "_INetGetSource". is there a way to get the ending url?!

or another HIDDEN solution?! thankssss!

Link to comment
Share on other sites

This works...

#include <Array.au3>
#include <INet.au3>
Global $Website = InputBox('Website','Web URL to search for source for links?','www.autoitscript.com')
Main()

While 1 
    sleep(100)
WEnd


Func Main()
$iUrl = _INetGetSource($Website)
$test = StringReplace($iUrl, '"http://', '-')
Local $Num = @extended
for $i = 1 to $Num Step 1
$1st = StringInStr($iUrl,'"http://',0,$i)
$2nd = StringInStr($iUrl,'"',0,1,$1st+1)
$Last = $2nd - $1st
$Find = StringMid($iUrl,$1st+1,$last-1)
IniWrite(@ScriptDir & '\url.ini',$website, "Main-Links"&$i,$Find)
Next
$test2 = StringReplace($iUrl, '<a href="', '-')
Local $Num2 = @extended
for $x = 1 to $Num2 Step 1
$Link1 = StringInStr($iUrl,'<a href="',0,$x)
$Link2 = StringInStr($iUrl,'">',0,1,$Link1)
$LinkL = $Link2 - $Link1
$Links = StringMid($iUrl,$Link1,$LinkL+2)
IniWrite(@ScriptDir & '\url.ini',$website, "Sub-Links"&$x,$Links)
Next
$rUrl = IniReadSection(@ScriptDir & '\url.ini',$Website)
    _ArrayDisplay($rUrl)
Exit
EndFunc
[Cheeky]Comment[/Cheeky]
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...