E equibubble New Member Licensed User Longtime User Jan 20, 2014 #1 Loving B4A, so powerful, will be purchasing the full version as soon as I get paid as a priority. Now for my question, I am trying to communicate with the database of my website. The website is written in Codeigniter and due to the load balancing in place, the domain may hit one of several servers and therefore one of several backend mysql servers. I have written a controller to handle requests coming from the app, all tested and working ok. My problem comes from the app. I have the following command: job.PostString("http://www.<mywebsitehere>.co.uk/index.php/<controllerhere>/login/", Query) and have also tried: job.PostString("http://www.<mywebsitehere>.co.uk/<controllerhere>/login/", Query) Login is obviously the function within the controller. Both work fine from my browser, but do not work within the app (get a 503). I can only assume it is something to do with the URL. And advice, much appreciated.
Loving B4A, so powerful, will be purchasing the full version as soon as I get paid as a priority. Now for my question, I am trying to communicate with the database of my website. The website is written in Codeigniter and due to the load balancing in place, the domain may hit one of several servers and therefore one of several backend mysql servers. I have written a controller to handle requests coming from the app, all tested and working ok. My problem comes from the app. I have the following command: job.PostString("http://www.<mywebsitehere>.co.uk/index.php/<controllerhere>/login/", Query) and have also tried: job.PostString("http://www.<mywebsitehere>.co.uk/<controllerhere>/login/", Query) Login is obviously the function within the controller. Both work fine from my browser, but do not work within the app (get a 503). I can only assume it is something to do with the URL. And advice, much appreciated.
E equibubble New Member Licensed User Longtime User Jan 20, 2014 #2 oh, must add: when I wrote and standalone file on the server to access the mysql db (so worked around codeigniter) everything worked ok, but due to the load balancing, I must have it work through codeigniter. Upvote 0
oh, must add: when I wrote and standalone file on the server to access the mysql db (so worked around codeigniter) everything worked ok, but due to the load balancing, I must have it work through codeigniter.
E equibubble New Member Licensed User Longtime User Jan 20, 2014 #3 ok, I managed to fix it myself, so posting solution for others (unless anyone can pose a better solution) Instead of using poststring, used download2 instead. Upvote 0
ok, I managed to fix it myself, so posting solution for others (unless anyone can pose a better solution) Instead of using poststring, used download2 instead.
Erel B4X founder Staff member Licensed User Longtime User Jan 21, 2014 #4 Job.PostString sends a POST request. Your service requires a GET request (same as the request sent by the browser when you enter an address). Upvote 0
Job.PostString sends a POST request. Your service requires a GET request (same as the request sent by the browser when you enter an address).
C Cre8ive New Member Licensed User Longtime User Jan 21, 2014 #5 Erel said: Job.PostString sends a POST request. Your service requires a GET request (same as the request sent by the browser when you enter an address). Click to expand... Hi Erel, When I switched from PostString to Download2, I also changed the receiving PHP file from Post to Get, at the same time as I noticed this in the documentation. p.s. I was equibubble; registered a new user Cre8ive when I purchased the software. Upvote 0
Erel said: Job.PostString sends a POST request. Your service requires a GET request (same as the request sent by the browser when you enter an address). Click to expand... Hi Erel, When I switched from PostString to Download2, I also changed the receiving PHP file from Post to Get, at the same time as I noticed this in the documentation. p.s. I was equibubble; registered a new user Cre8ive when I purchased the software.