For test example links :
1 - <a href='http://www.protectlinks.com/38282' class='bbc_url' title='External link' rel='nofollow external'>http://www.protectlinks.com/38282</a> 2 - <a href='http://www.protectlinks.com/38283' class='bbc_url' title='External link' rel='nofollow external'>http://www.protectlinks.com/38283</a> 3 - <a href='http://www.protectlinks.com/38284' class='bbc_url' title='External link' rel='nofollow external'>http://www.protectlinks.com/38284</a> 4 - <a href='http://www.protectlinks.com/38285' class='bbc_url' title='External link' rel='nofollow external'>http://www.protectlinks.com/38285</a> 5 - <a href='http://www.protectlinks.com/38286' class='bbc_url' title='External link' rel='nofollow external'>http://www.protectlinks.com/38286</a>


AutoIt
#include <GuiEdit.au3> #include <INet.au3> #include <IE.au3> #include <String.au3> #include <GUIConstants.au3> $Form = GUICreate("Protectlinks decoder and Rapidshare checker", 400, 300) $oIE = _IECreateEmbedded() $Edit = GUICtrlCreateEdit("", 10, 10, 380, 250) $Button = GUICtrlCreateButton("Protectlinks decode", 10, 265, 185, 25) $Button2 = GUICtrlCreateButton("Rapidshare links check", 200, 265, 190, 25) $GUIActiveX = GUICtrlCreateObj($oIE, 1, 1, 1, 1) GUICtrlSetState($GUIActiveX, $GUI_HIDE) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $Button Hidecontrols() $Count = _GUICtrlEdit_GetLineCount ($Edit) $Data = "" For $i = 0 To $Count - 1 GUICtrlSetData($Button, $i + 1 & "/" & $Count & " " & Round(((($i + 1) / ($Count)) * 100), 0) & "%") $Line = _GUICtrlEdit_GetLine ($Edit, $i) Check() Next GUICtrlSetData($Edit, $Data) Showcontrols() Case $Button2 Hidecontrols() GUICtrlSetState($Button2, $GUI_DISABLE) GUICtrlSetState($Button, $GUI_DISABLE) GUICtrlSetState($Edit, $GUI_DISABLE) GUICtrlSetData($Button2, "Loading...") _IENavigate($oIE, "<a href='http://rapidshare.com/en/checkfiles.html' class='bbc_url' title='External link' rel='nofollow external'>http://rapidshare.com/en/checkfiles.html"</a>) $Box = _IEGetObjByName($oIE, "urls") $Count = _GUICtrlEdit_GetLineCount ($Edit) For $i = 0 To $Count $Line = _GUICtrlEdit_GetLine ($Edit, $i) If $i = 0 Then $Data = $Line Else $Data = $Data & @CRLF & $Line EndIf Next _IEFormElementSetValue($Box, $Data) $Submit = _IEFormGetCollection($oIE, 0) _IEFormSubmit($Submit) $Source2 = _IEDocReadHTML($oIE) Check2() Showcontrols() Case - 3 Exit EndSwitch WEnd Func Check() If StringInStr($Line, "protectlinks") Then $Split = StringSplit($Line, "com/", 1) $Source = _INetGetSource("<a href='http://www.protectlinks.com/redirected.php?id=' class='bbc_url' title='External link' rel='nofollow external'>http://www.protectlinks.com/redirected.php?id="</a> & $Split[2]) $Link = _StringBetween($Source, 'width="100%" src="', '"></iframe>') If $i = 0 Then $Data = $Link[0] Else $Data = $Data & $Link[0] EndIf EndIf EndFunc ;==>Check Func Check2() $Strings = _StringBetween($Source2, '<font color="red">File ', ') not found!</font>\n') If IsArray($Strings) Then $Broken = "" $Count = _GUICtrlEdit_GetLineCount ($Edit) For $i = 0 To UBound($Strings) - 1 $Split2 = StringSplit($Strings[$i], " (", 1) For $z = 0 To $Count $Line = _GUICtrlEdit_GetLine ($Edit, $z) If StringInStr($Line, $Split2[1]) Then If $Broken = "" Then $Broken = $Line Else $Broken = $Broken & @CRLF & $Line EndIf EndIf Next Next MsgBox("", "", "Found " & UBound($Strings) & " broken link." & @CRLF & $Broken) Else If StringInStr($Source2, '<font color="green">') Then MsgBox("", "", "All links working!") EndIf EndFunc ;==>Check2 Func Hidecontrols() GUICtrlSetState($Button, $GUI_DISABLE) GUICtrlSetState($Button2, $GUI_DISABLE) GUICtrlSetState($Edit, $GUI_DISABLE) EndFunc Func Showcontrols() GUICtrlSetData($Button, "Protectlinks Decode") GUICtrlSetData($Button2, "Rapidshare links check") GUICtrlSetState($Edit, $GUI_ENABLE) GUICtrlSetState($Button2, $GUI_ENABLE) GUICtrlSetState($Button, $GUI_ENABLE) EndFunc
Edited by Jex, 23 November 2007 - 05:57 PM.





