| Server IP : 104.21.37.246 / Your IP : 104.23.243.32 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/cp648411/public_html/simded.com/home/ |
Upload File : |
<?php
$curl = curl_init();
$originalURL = 'https://horo.simded.com/daily/extra2.php';
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.short.io/links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode(array(
'originalURL' => $originalURL,
'domain' => 'simded.short.gy'
)),
CURLOPT_HTTPHEADER => array(
"authorization: sk_A7yma9RwKB4yQ4L8",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
$response = json_decode($response, JSON_UNESCAPED_UNICODE );
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response['shortURL'];
}