File "test.php"

Full path: /home/kosmetik/public_html/somnart/test.php
File size: 614 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

<?php

$testz = ['nr_comanda' => '41863', 'greutate' => '1', 'nr_colete' => '1'];
$data = json_encode($testz);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://somnart.ro/wp-content/plugins/oracle-easysales/generare-awb.php');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
$server_output = curl_exec($ch);
$httpcode = curl_getinfo($ch);
curl_close($ch);
var_dump($server_output);
exit;