<script></script>
if(isset($_POST['url'])){
class Api
{
public $api = '; // API URL
public $api = ''; // Api Key Mobil Takipci.netadresine girip alabilirsiniz.
public function order($data) { // add order
$post = array_merge(array('key' => $this->api_key, 'action' => 'add'), $data);
return json_decode($this->connect($post));
}
public function status($order_id) { // get order status
return json_decode($this->connect(array(
'key' => $this->api_key,
'action' => 'status',
'order' => $order_id,
)));
}
private function connect($post) {
$_post = Array();
if (is_array($post)) {
foreach ($post as $name => $value) {
$_post[] = $name.'='.urlencode($value);
}
}
$ch = curl_init($this->api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
if (is_array($post)) {
curl_setopt($ch, CURLOPT_POSTFIELDS, join('&', $_post));
}
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)');
$result = curl_exec($ch);
print_r($result);
if (curl_errno($ch) != 0 && empty($result)) {
$result = false;
}
curl_close($ch);
return $result;
}
}
?>
$timeA = "29.07.2018 17:30";
$timeB = date("d.m.Y H:i");
$timeDiff = strtotime($timeB) - strtotime($timeA);
if($timeDiff > 180){
echo "gecti";
}else{
echo "gecmedi";
}
$url = htmlspecialchars(trim(addslashes($_POST['url'])));
$api = New Api();
$order = $api->order(array('service' => 118, 'link' => $url, 'quantity' => 100)); # Normal siparis gönderir ?>
$status = $api->status(10); //Siparis id'ye göre durumunu sorgular.
}
?>
Mobil Takipci.COM
MobilTakipci.Net