I need to create a POST request with http_build_query. Following are my codes:
$uri_args = array (
'name' => 'Jack',
'surname' => 'Jackson',
'username' => 'jackson12',
'email' => '[email protected]',
);
$uri = http_build_query($uri_args);
header("Location: http://samplesite.com?$uri");
At the moment it generates a request like GET, but I need POST. Consider that I do not want to use curl, ... only http_build_query.
POST
, isGET
. To create aPOST
request usecURL
, something like this http://www.php.net/manual/en/function.curl-exec.php#98628