Essentially what i'm looking for is a solution that will parse fields (from GET and POST requests) and remap them to another service (URL)
For example, this might be the workflow:
http://www.remap-system.com/redirect-to-service1/
The system parses the form and remaps the preconfigured fields :
myname => name, myemail => email, myphone => phone
The system sends the new remapped requests to service1 url (with POST or GET)
On WordPress we've got a plugin that does just that, but I'm looking for a system that is more robust and autonomical. Is there a ready made system for that? If not, what will be the easiest way to implement that?
Coffee-break answer :)
$map = [ "myname" => "name" ];
$src = $_POST;
$dst = [];
foreach($src as $k=>$v) {
if(isset($map[$k]) {
$dst[$map[$k]] = $v;
}
}
// var_dump($dst);
// send $dst somewhere