iOS Question apikey use with httpjob

tufanv

Expert
Licensed User
Longtime User
Hello,

I asked this question before in b4a forum, as Erel suggested , if i store the url within the process global , the url is obfuscated and when the url is https , the app's network traffic can't be monitored so my api key to data feed won't be visible to anyone.

For the b4i , same thing is valid for the sniffing ( https will only reveal hostname not the remaining the includes the api key ) but because there is no obfuscation , I won't be able to hide the url within the app.

As some people suggested in b4a forum , using my own server to request data will be more logical. ( i will use a url in my app to my server and my server will get data from the feed and give my app a response. )

Question is how to do that ?
Normally with httpjobs I use :

B4X:
Dim connection As HttpJob
connection.Initialize("getdata",Me)
connection.download2("https://url/data.php", Array As String ("action", "getdata"))

and in my php i use:

B4X:
switch ($action)
{



case "getdata":

??

break;

This makes me confused. How can i het the data from an url within the php and after i get this response how can i send it back to app? I am not sure if this is the correct place for this topic.

Thanks.
 

tufanv

Expert
Licensed User
Longtime User
What is the question? How to implement the PHP script? Why not implement it with B4J? It will be simpler.

You can use the cURL module in PHP to send the requests.

Curl worked perfect for me. Thanks Erel !
 
Upvote 0
Top