View Full Version : how to count numer from 1 to max 9999
djmoh
06-10-2007, 02:53 PM
Hi,
i am new to ams and i need to get an number from 0001 to maximum 9999
and every number must be tested... in an url link
id = Input.GetText("krijgid");
find = ** Here i dont know how to .... the code must test every number f
rom 0001 to the max 9999 in the url everything works but i dont know
how to math 0001 + 1 everytime and check the link if availeble..***
Web.LoadURL(web1, "/gotourl.php?pid="..id.."&ebpin="..find);
I Would be glad if someone could help me ...:D
P.S. I am Dutch so english is not my best ..:lol
Thanks
RizlaUK
06-10-2007, 05:58 PM
do you want to load each link into the web object or just test them and load only a valid link ??
djmoh
06-11-2007, 09:16 AM
hi
each number must be tested ... from www."thesite".nl/bel/pay.php?&ebpin="the number comes here"
Just 1 of those codes will download the program ...
I need to get the link witch will dowload a or the program...:huh
- ps this is to test if someone could steal my services ...
- with this i will improve my web service so no - one can download withouth paying...
:D thanks if you dont know what i mean plzz ask me what you want to hear ..
thanks for helpin..:lol
RizlaUK
06-11-2007, 09:48 AM
ok, well you could try something like this
find = 1
while find < 9999 do
test = HTTP.TestConnection( "http://www.thesite.nl/bel/pay.php?&ebpin="..find, 20, 80, nil, nil);
if test then
Web.LoadURL(web1, "http://www.thesite.nl/bel/pay.php?&ebpin="..find);
return false
else
find=find+1
return true
end
end
but this code is off the cuff, i am unable to test it without proper information but it should give you a starting point
hope that helps
djmoh
06-11-2007, 10:13 AM
sorry forgot to place the Dutch.... sorry no english but you will know code ...
App ...:D
Download the file below is the app ams6.0
http://www.dj-moh.nl/download/testid.rar
well i tryed but i dont really know how to put it there ...
find = 1
while find < 9999 do
test = HTTP.TestConnection("http://www.dj-moh.nl/bel/gotourl.php?pid="..id.."&ebpin="..find, 20, 80, nil, nil);
if test then
Web.LoadURL(web1, "http://www.dj-moh.nl/bel/gotourl.php?pid="..id.."&ebpin="..find);
return false
else
find=find+1
return true
end
end
in the code there is test = http blablabla...
but where is it called ?
what does it do ?
i could do somthingwith a Listbox maybe ? to get the urls in it and see the result ? when it downloads the file ?
doesnt matther how but i need help with it ,...
thanks man for help and if you need some back ask me ..:D :yes
djmoh
10-26-2007, 01:51 AM
hi i am back now from hard working ... bin deasapered for a while.
i am having the sam problem again....
you are doing a great job helping me out but i am not done yet...
the counting from
find=1
find+1
....
but i dont need to get a number 1 ...
i want to have it must be 0001 till 9999
not 1 < 9999 but it wont work if you put in 0001 < 9999
how can i fix the triple zero ... 0001
to work till 9999
thanks mates for helping me out ...
longedge
10-26-2007, 08:39 AM
You need to use a number string. You might for instance have code in your page timer event -
if n<10 then
str_n = "000"
end
if (n<100 and n>9) then
str_n = "00"
end
if (n<1000 and n>99) then
str_n = "0"
end
str_n=str_n..n
-- do some test or other here
-- the variable str_n will always display 4 digits
-- n is incremented until it = 1000 then reverts to 1
n=n+1
if n>1000 then
n=1
end
You would of course have initialized the variable n somewhere else beforehand.
djmoh
10-27-2007, 06:07 PM
hi thnx for a bit of help....
i am trying to use 2 listboxes to show the link an the other to show if it passed the code...
i just need to get a counter if you put in the pageid in the link...
then it will find the ebid in the link to download a program...
example:
http://www.dj-moh.nl/download.php?&pid="four didgit code"&ebid="this is wat to count"
it doesnt matter wat the program trys to do ...
it only needs to fill in the link the pid="...." thats the easy part...
now i need the program to try find the code that wil automatically download a nother program....
thnx for help ... i will add my .apz to it so you can see ...
its only in Dutch ...
just press "gelezen/accoord" button that meens "i agree"
Then press "ja" op the dialog...
its pretty nonsense now the license ...
but your good to go ...
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.