Skip to content

Instantly share code, notes, and snippets.

@arthurbonora
Last active April 15, 2022 18:15
Show Gist options
  • Save arthurbonora/98828c2136672838a4812547184bb0cd to your computer and use it in GitHub Desktop.
Save arthurbonora/98828c2136672838a4812547184bb0cd to your computer and use it in GitHub Desktop.
[FORDROP] Exemplo PHP para requisições na API
<?php
$camada = '';
$metodo = '';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'https://api.fordrop.com.br?metodo='.$metodo.'&camada='.$camada,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => [
token => 'xxxxxxxxxxxxxxx',
parametro1 => 'valor',
parametro2 => 'valor'
]
]);
$response = curl_exec($curl);
curl_close($curl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment