• I’m writing a plugin, which should be able receive data from external server and save them to the site Data Base.

    The main problam is that if I try to send request from external server to the .php file that uses native WordPress functions – the WP ignores this request and the script does not receive any request.

    The solution which I found is the next:
    I receive the data (from external server) by using .php file that saves this data in the .txt file. After that, I invoke .php file that use native WP functions and save data from this file to the Data Base. I understand that this is like a cheat the WP security.

    But I need to know: is here a way to receive data from external server and directly save to the Data Base using native WP classes for working with Data Base, without using extra file like that .txt file.

    Also, using native WP function with DataBase makes the work more safe.

    I already used the “Plugin API/Action Reference/admin post (action)”. But it allows to receive data as logged site admin (like from my own admin page). I need to receive data from external server by the plugin without admin access, and I can take the risk on myself, but I want to use the native WP functions to receive that request and work with DataBase.

    Is it possible?

  • The topic ‘Receive data from external server and save it in data base by plugin’ is closed to new replies.