This is the payload that handles all server code for my (very basic)PS4API. It is built upon kr105rlz's PS4-dlclose exploit, so huge thanks to him for that code!!!!
This is meant to be compiled using CTurt's PS4 SDK. https://github.com/CTurt/PS4-SDK however, I am sure you could migrate it to another sdk such as psxdev's sdk.
Again, I want to say thanks to the following people for their help in the PS4 Community: 2much4u, Bad ChoicesZ, CTurt, qwertyoruiop, kr105rlz, Z80, and Zecaxco