@קול-הלב אמר בצריך עזרה - בעיה בקוד התחברות למערכת תכנים טלפוני:
שלום וברכה בניתי קוד להתחברות למערכת תכנים טלפונית - בכדי להתקין הגדרות מתקדמות למערכות .
הבעיה : שתמיד בכל היתחברות אני שומע " פרטי היתחברות שגויים "
אשמח לתשובה .
| <?php |
| if($_GET["hangup"]=="yes"){ |
| unlink("txt_filse/$_GET[ApiCallId]_sysemType.txt"); |
| unlink("txt_filse/$_GET[ApiCallId]_token"); |
| } |
| if(!$_GET["PrivetORregular"]){ |
| print "read=t-אנא בחרו את שרת המערכת שלכם , לרגיל הקישו 1 , לפריווט הקישו 2 =PrivetORregular,no,1,1,7,Digits,yes,yes,,1.2,"; |
| exit; |
| } |
| if (!$_GET["number"]){ |
| print "read=t-אנא הקישו את מספר המערכת שלכם , שימו לב ניתן להקיש מספר מערכת בעל .n-9.t-או.n-10.t-ספרות=number,no,10,9,15,Digits,yes,"; |
| exit; |
| } |
| if(!$_GET["password"]){ |
| print "read=t-אנא הקישו את סיסמת הניהול של המערכת שלכם=password,no,100,1,20,Digits,"; |
| exit; |
| } |
| switch ($_GET["PrivetORregular"]){ |
| case 1: |
| $sysemType= fopen("txt_files/$_GET[ApiCallId]_sysemType.txt","w"); |
| fwrite($sysemType,"regular"); |
| fclose($sysemType); |
| $entertype = "https://www.call2all.co.il/ym/api/login?username=$_GET[number]&password=$_GET[password]"; |
| break; |
| case 2: |
| $sysemType= fopen("txt_files/$_GET[ApiCallId]_sysemType.txt","w"); |
| fwrite($sysemType,"Privet"); |
| fclose($sysemType); |
| $entertype = "https://private.call2all.co.il/ym/api/login?username=$_GET[number]&password=$_GET[password]"; |
| break; |
| } |
| $get_token = shell_exec("curl '$entertype'"); |
| $token_array = json_decode($get_token,true); |
| if ($token_array["token"]==NULL){ |
| print "id_list_message=t-פרטי ההיתחברות שגויים&go_to_folder=hangup"; |
| } |
| else{ |
| $save_token = fopen("txt_files/$_GET[ApiCallId]_token.txt","w"); |
| fwrite($save_token,$token_array["token"]); |
| fclose($save_token); |
| print "go_to_folder=/10/1/"; |
| } |
| ?> |
תוריד את ! בפקודת ה switch