api_key = (string) $api_key; } public function order($data) { return json_decode( $this->connect(array_merge([ 'key' => $this->api_key, 'action' => 'add', ], $data)), true ); } public function status($order_id) { return json_decode( $this->connect([ 'key' => $this->api_key, 'action' => 'status', 'order' => $order_id, ]), true ); } public function multiStatus($order_ids) { return json_decode( $this->connect([ 'key' => $this->api_key, 'action' => 'status', 'orders' => $order_ids, ]), true ); } public function services() { return json_decode( $this->connect([ 'key' => $this->api_key, 'action' => 'services', ]), true ); } public function balance() { return json_decode( $this->connect([ 'key' => $this->api_key, 'action' => 'balance', ]), true ); } public function refill($order_id) { return json_decode( $this->connect([ 'key' => $this->api_key, 'action' => 'refill', 'order' => $order_id, ]), true ); } public function refill_status($refill_id) { return json_decode( $this->connect([ 'key' => $this->api_key, 'action' => 'refill_status', 'refill' => $refill_id, ]), true ); } private function connect($post) { $_post = []; foreach ($post as $name => $value) { $_post[] = $name . '=' . urlencode((string) $value); } $ch = curl_init(self::API_URL); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, implode('&', $_post)); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 30); $result = curl_exec($ch); curl_close($ch); return $result; } } // Examples — 11 servis türü (service ID'leri kendi kataloğunuza göre değiştirin) $api = new Api('YOUR_API_KEY'); // 1. Default $api->order(['service' => 1, 'link' => 'https://instagram.com/p/example', 'quantity' => 1000]); // 2. Package $api->order(['service' => 2, 'link' => 'https://instagram.com/p/example']); // 3. Custom Comments $api->order(['service' => 3, 'link' => 'https://instagram.com/p/example', 'comments' => "Great post!\nNice photo!\nLove it!"]); // 4. Comment Likes $api->order(['service' => 4, 'link' => 'https://instagram.com/p/example', 'quantity' => 500, 'username' => 'targetuser']); // 5. Poll $api->order(['service' => 5, 'link' => 'https://instagram.com/p/example', 'quantity' => 100, 'answer' => 'Option A']); // 6. SEO $api->order(['service' => 6, 'link' => 'https://example.com/page', 'quantity' => 1000, 'keyword' => 'best smm panel']); // 7. Mentions User Followers $api->order(['service' => 7, 'link' => 'https://instagram.com/p/example', 'quantity' => 500, 'username' => 'celebrity']); // 8. Mentions Hashtag $api->order(['service' => 8, 'link' => 'https://instagram.com/p/example', 'quantity' => 500, 'hashtag' => 'travel']); // 9. Mentions Custom List $api->order(['service' => 9, 'link' => 'https://instagram.com/p/example', 'usernames' => "user1\nuser2\nuser3"]); // 10. Invites from Groups $api->order(['service' => 10, 'link' => 'https://t.me/targetgroup', 'quantity' => 100, 'groups' => 'https://t.me/sourcegroup']); // 11. Subscriptions $api->order(['service' => 11, 'username' => 'targetuser', 'min' => 100, 'max' => 500, 'posts' => 20, 'delay' => 5, 'expiry' => '2026-12-31']); // Diğer yardımcı çağrılar $api->balance(); $api->services(); $api->status(12345); $api->multiStatus('1,2,3'); // Refill (telafi) — tamamlanmış siparişler için $refillResponse = $api->refill(12345); // Başarılı: {"refill": "1"} | Hata: {"error": "Refill not available for this order"} // Refill durumu sorgulama $refillStatus = $api->refill_status('1'); // Örnek yanıt: {"status": "Completed"}