将HTTP请求字段重新映射到另一个服务

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:

  1. User submits form with three fields: 'myname','myemail' and 'myphone'. the request is sent over to the system on a url: http://www.remap-system.com/redirect-to-service1/
  2. The system parses the form and remaps the preconfigured fields :

    myname => name, myemail => email, myphone => phone

  3. 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