Answer the question
In order to leave comments, you need to log in
Why is the request not being sent?
Good afternoon!
I work through the API of a certain service.
You need to send a request to add a user.
I do so.
<?
$postdata = http_build_query(
array(
'api_username' => 'name',
'api_password' => 'password',
'MODULE' => 'Customer',
'COMMAND' => 'add',
'FirstName' => $_POST['FirstName'],
'LastName' => $_POST['LastName'],
'email' => $_POST['email'],
'Phone' => $_POST['Phone'],
'campaignId' => '3834',
'Country' => $_POST['Country'],
'birthday' => '1980-07-21',
'gender' => 'male',
'password' => $_POST['password'],
'currency' => 'USD',
'subCampaign' => 'qw'
)
);
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
)
);
$context = stream_context_create($opts);
$result = file_get_contents('http://proxy.optionrally.com/api/?', false, $context);
echo $result;
?>
FirstName=Artem&LastName=Name&email=a1rt2349%401gmail.com1&Phone=%2B373345327720&Country=8&password=123123123
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question