XxKanexX
2006-07-07 12:55:20
Just say there we 200 zip files on a website, Input the Extension const as ".zip" and the site address in site then press play. It should gather the link to all 200 zip files and display it.
Only another re-write of an old script, no particular purpose unless you're downloading files and don't want to run through the page.
Only another re-write of an old script, no particular purpose unless you're downloading files and don't want to run through the page.
Const Extension = '.zip';
Const Site = 'http://www.greendayauthority.com/download/videos.php';
function Del(w: array of Char; s: String): String;
var i, e: Integer;
begin
Result:= s;
for i:= 1 to Length(s) do
begin
for e:= 0 to GetarrayLength(w)-1 do
begin
if (Copy(Result, i, 1) = w[e]) then Delete(Result, i, 1);
end;
end;
end;
var EPos: array of Integer;
var s, g: String;
var i, e, a: Integer;
begin
SetarrayLength(EPos, 1);
ClearDebug;
Writeln('Recieving Site.');
s:= GetPage(Site);
for i:= 1 to Length(s) do
begin
if (Copy(s, i, Length(Extension)) = Extension) then
begin
EPos[GetarrayLength(Epos)-1]:= i;
SetarrayLength(EPos, GetarrayLength(Epos) + 1);
end;
end;
Writeln('Found: ' + Inttostr(GetarrayLength(EPos)-1));
Writeln(' ');
for i:= 0 to GetarrayLength(EPos)-2 do
begin
a:= 0;
repeat
a:= a + 1;
until(Copy(s, EPos[i]-a, 1) = '"');
g:= Copy(s, EPos[i]-a, a + Length(Extension));
Delete(g, 1, 1);
while (Copy(g, 1, 1) = ' ') do Delete(g, 1, 1);
Writeln(Inttostr(i + 1) + ': "' + Del(['<', '>'], g) + '"');
end;
end.