Asked by duncanb7
at 2024-04-27 09:21:22
Point:500 Replies:6 POST_ID:828491USER_ID:11059
Topic:
PHP Scripting Language;;JavaScript
in my following php code I do automation for grab data from 10 webpage at the same website,
sometimes, I get hangup and I guess the reason url link is busy so let loadHTMLfile() keep waiting.
it takes for a really long ocassionlly such as 15-30 minutes. the webpage size is really small as 30k.
Why my php code of loadHTMLFile() is no timing limit and fall back to next code once the time waiting
is too long.
Do you have any method to timer the waiting time in php code, once the time is expired and then
go to next line of code in same php program ?
In VBA I will use this but the code in the loop is never in idle and never waiting forever so it will be okay
but for php's loadHTMLFile() that won't work if using similar while loop . Any suggestion, please advise
VBA code to set timer for waiting
=======================
a=Time()
Do until TimeValue(Time()) - TimeValue(a) > TimeValue("00:01:00")
'code here
Loop
sometimes, I get hangup and I guess the reason url link is busy so let loadHTMLfile() keep waiting.
it takes for a really long ocassionlly such as 15-30 minutes. the webpage size is really small as 30k.
Why my php code of loadHTMLFile() is no timing limit and fall back to next code once the time waiting
is too long.
Do you have any method to timer the waiting time in php code, once the time is expired and then
go to next line of code in same php program ?
In VBA I will use this but the code in the loop is never in idle and never waiting forever so it will be okay
but for php's loadHTMLFile() that won't work if using similar while loop . Any suggestion, please advise
VBA code to set timer for waiting
=======================
a=Time()
Do until TimeValue(Time()) - TimeValue(a) > TimeValue("00:01:00")
'code here
Loop