try { ini_set("soap.wsdl_cache_enabled", 0); // آدرس وب‌سرویس SOAP $client = new SoapClient("http://api.payamak-panel.com/post/send.asmx?wsdl", array("encoding" => "UTF-8")); // استفاده از متد صحیح: SendSimpleSMS2 // پارامترها به صورت جداگانه (نه در یک آرایه) ارسال می‌شوند $result = $client->SendSimpleSMS2( $username, $password, $to, $from, $text, false // isFlash )->SendSimpleSMS2Result; // بررسی نتیجه if (is_numeric($result) && $result > 100000000000000) { $result_message = '✅ پیامک با موفقیت ارسال شد. شناسه ارسال (RecId): ' . $result; $result_type = 'success'; } else { // ... (همان بخش مدیریت خطاهای قبلی) } } catch (Exception $e) { $result_message = 'خطا در ارتباط با سرور (SOAP): ' . $e->getMessage(); $result_type = 'error'; }