Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
api
/
bookurier
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php header("Content-Type: application/pdf"); function print_awb() { $url = 'http://www.bookurier.ro/colete/serv/get_AWB_pdf.php'; $ch = curl_init(); $msgstr = "<msg>\r\n\t\t\t<cmd>\r\n\t\t\t<awb>" . $_REQUEST['awb_id'] . "</awb>\r\n\t\t </cmd>\r\n\t\t </msg>"; $msgstr = str_replace(array("\r", "\n", "\r\n", "\t"), '', $msgstr); $user_id = $_REQUEST['username']; $pwd = $_REQUEST['password']; $fields = array('userid' => $user_id, 'pwd' => $pwd, 'msg' => urlencode($msgstr)); $fields_string = ''; foreach ($fields as $key => $value) { $fields_string .= $key . '=' . $value . '&'; } rtrim($fields_string, '&'); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, count($fields)); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); echo curl_exec($ch); } if ($_GET['awb_id'] != "" && $_GET['username'] != "" && $_GET['password'] != "") { print_awb(); } else { echo 'Eroare'; }