Having trouble with http_get_page2 using a calculated web address
I have an online shop based on a PHP cart and want to import orders onto our main Alpha system. I have created a PHP page to extract data from the online db (only accessible via web page) and wanted to use HTTP_GET_PAGE2 to read this data. Being PHP the web address with extracted data looks like this:
http://www.example.co.uk/dir/phpdata.php?orderid=400
The orderid auto increments online with each new order and this info is emailed to me by the website. So as long as I know the orderid I can extract the data and put this into our main system. The following code works for orderid 400
A5_EXTRACT_ADVANCE(http_get_page2("http://www.example.co.uk/dir/phpdata.php?orderid=400"),'<body>','</body>')
But I wanted to format the http_get_page2 autotmatically, I created a new field in our main system called online_order and constructed the following calculated field:
quote("http://www.example.co.uk/dir/phpdata.php?orderid="+alltrim(Online_Order)) called online_url
The result was
"http://www.example.co.uk/dir/phpdata.php?orderid=401" where Online_Order value was 401 etc
Re-wrote http_get_page2 code as follows
A5_EXTRACT_ADVANCE(http_get_page2(online_url),'<body>','</body>')
This did not work and gave no error messages
Any ideas what I may be doing wrong?
I have an online shop based on a PHP cart and want to import orders onto our main Alpha system. I have created a PHP page to extract data from the online db (only accessible via web page) and wanted to use HTTP_GET_PAGE2 to read this data. Being PHP the web address with extracted data looks like this:
http://www.example.co.uk/dir/phpdata.php?orderid=400
The orderid auto increments online with each new order and this info is emailed to me by the website. So as long as I know the orderid I can extract the data and put this into our main system. The following code works for orderid 400
A5_EXTRACT_ADVANCE(http_get_page2("http://www.example.co.uk/dir/phpdata.php?orderid=400"),'<body>','</body>')
But I wanted to format the http_get_page2 autotmatically, I created a new field in our main system called online_order and constructed the following calculated field:
quote("http://www.example.co.uk/dir/phpdata.php?orderid="+alltrim(Online_Order)) called online_url
The result was
"http://www.example.co.uk/dir/phpdata.php?orderid=401" where Online_Order value was 401 etc
Re-wrote http_get_page2 code as follows
A5_EXTRACT_ADVANCE(http_get_page2(online_url),'<body>','</body>')
This did not work and gave no error messages
Any ideas what I may be doing wrong?