php - Matlab urlread error within timer function -
i using timer function in matlab continuously execute script. within script, using urlread
retrieve data webservices, works charm.
i trying use urlread
execute simple http-request within script insert data mysql-database. thus, specify url-string , define value parsed php parser.
code-within script being executed in timer-function:
db_url = 'http://someurl/update.php?value='; db_url = strcat(db_url,num2str(value)); urlread(db_url); clear db_url
my problem following: when run timer, works fine 1 execution, stops displaying following error:
"either url not parsed or protocol not supported."
what going wrong? when check mysql database, see 1 new line has been added database, means works, won't execute multiple times within timer.
any idea going wrong? many in advance!
i figured out problem was. value
variable array increasing in size each iteration. thus, needed specify value(end)
, so:
db_url = 'http://someurl/update.php?value='; db_url = strcat(db_url,num2str(value(end))); urlread(db_url); clear db_url
Comments
Post a Comment