Page 1 of 1

ANTBE can help me? timeout in script...

Posted: 2007-11-02 12:01:45
by gnbusetto
I re-write Legrad's script 'DVDMOVIES'
and it's now working fine...
exept...
When you connect to search first time 'connection erro' shows.
Re-search again, and voilá, all it's OK!!!!

Maybe it´s a cokie?
or what else'

Can help me?
thank a lot.

Posted: 2007-11-02 16:33:08
by antp
Maybe there is a variable that is not initialized.
Try to check value of the variables that you give to GetPage function.

Posted: 2007-11-02 18:53:16
by bad4u
On the first run it loads the intro page instead of the search page. You can see this behaviour when you open a new browser window and try to load the search page (http://www.dvdmovies.com.ar/ventas/peli ... anzado.php) in the browser. Same happens when the browser within AMC loads the page.

You will need to find a different link for the search that loads the correct page or maybe there is another way using Getpage2 (with a referrer page) ? I did not use GetPage2 yet - I just played around with it earlier, but still not sure about how it works. Maybe Antoine can give an example ? ;)

Posted: 2007-11-02 19:54:59
by antp
GetPage(Address)
becomes
GetPage2(Address, 'http://www.dvdmovies.com.ar/');
But as referrer is never used with GetPage, it should not work better on 2nd time. So I still wonder what it is. Maybe a cookie, but I thought that they were not handled automatically.

Posted: 2007-11-02 23:20:51
by bad4u
Maybe I'll have a closer look on it the next days.

For now I have a simple workaround - you only have to load the intro page before loading the search page.
Use

Code: Select all

strPage := GetPage('http://www.dvdmovies.com.ar');
strPage := GetPage(Address);

instead of

Code: Select all

strPage := GetPage(Address);
Btw.. you can delete

Code: Select all

if(GetOption('Sin resultado') = 0) then Input('DVDmovies', 'Buscar:', MovieName);
as you have not initialized any options on script properties.