network.request() to local php file?

Hi everyone!

Is it possible to send POST data to a local php file in that is placed in project folder among all the lua files using network.request?

Can’t get it working :confused:
If I use only the filename I get an error but if I use (fiilename, system.ResourceDirectory" I don’t get the error but then the response doesn’t work. I know there isn’t anything wrong with the response since it works while using xampp.

My code:

 local function networkListener( event )  
 if ( event.isError ) then  
 print( "Network error!")  
 else  
 print (event.response )  
 end  
 end  
  
 postData = "testValue=" .. "myTestValue!"  
 local params = {}  
 params.body = postData  
  
 network.request( "myLocalFile.php", "POST", networkListener, params)  

-Oskar [import]uid: 24111 topic_id: 25771 reply_id: 325771[/import]

This isn’t possible. PHP works because certain web servers have PHP installed and it knows how parse and processs the files. I guess it’s technically possible for you to program a web server into your app and for you to spend years porting PHP to Lua with all those library calls.

But if your being reasonable, not practical
[import]uid: 19626 topic_id: 25771 reply_id: 104206[/import]