Me gustaría eliminar la mayoría de los comentarios para que sea más fácil de leer ![]()
Algunos comentarios son innecesarios, como:
// Obtener resultado
//
$result = curl_exec( $ch );
o
// cerrar sesión de curl
curl_close( $ch );
Además, sepa que puede establecer el resaltado de sintaxis agregando el nombre del idioma a la primera línea de las comillas invertidas:
```php
$headers = array("Content-Type: multipart/form-data;","Api-Key: $api_key","Api-Username: system",);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers );
curl_setopt($ch, CURLOPT_POSTFIELDS,$data);
```
Se renderiza como
$headers = array("Content-Type: multipart/form-data;","Api-Key: $api_key","Api-Username: system",);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers );
curl_setopt($ch, CURLOPT_POSTFIELDS,$data);