Initial import

This commit is contained in:
sas.fajri
2026-04-27 10:26:26 +07:00
commit bf9b9097ee
2388 changed files with 3002242 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
class Qr_polos extends MY_Controller
{
public function __construct()
{
parent::__construct();
}
function pcr($nolab)
{
$img_qrcode = $this->post("http://localhost/charts/qrtext.php", $nolab);
header("Content-type: image/png");
echo $img_qrcode;
exit;
}
public function post($url, $data)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt(
$ch,
CURLOPT_HTTPHEADER,
array(
'Content-Type: application/text',
'Content-Length: ' . strlen($data)
)
);
$result = curl_exec($ch);
if (curl_error($ch) != "") {
return "ERROR Accessing QrCode : " . curl_error($ch) . "\n";
}
curl_close($ch);
return $result;
}
}