• הרשמה
    • התחברות
    • חיפוש
    • דף הבית
    • אינדקס קישורים
    • פוסטים אחרונים
    • קבלת התראות מהדפדפן
    • משתמשים
    • חיפוש בהגדרות המתקדמות
    • חיפוש גוגל בפורום
    • ניהול המערכת
    • ניהול המערכת - שרת private

    קוד php לא עובד טוב בטלפון

    פורום PHP
    3
    4
    201
    טוען פוסטים נוספים
    • מהישן לחדש
    • מהחדש לישן
    • הכי הרבה הצבעות
    תגובה
    • הגיבו כנושא
    התחברו בכדי לפרסם תגובה
    נושא זה נמחק. רק משתמשים עם הרשאות מתאימות יוכלו לצפות בו.
    • 1
      121244 נערך לאחרונה על ידי 121244

      אני מנסה להריץ דרך הטלפון זה מבקש סיסמת ניהול ואחרי שאני מקיש (בין נכונה , ובין לא) שומעים רק שקט עד לניתוק (בדפדפן עובד רגיל)
      ולפניכם תמונה מהלוג api
      54c5cf54-c406-4b1d-9ffd-d4cd3c4c2abb-image.png
      הקוד

      <?php 
      $playStop = $_GET['PlayStop'];
       $text = "1";
      $pass = $_GET['pass'];
      $did = $_GET['ApiDID'];
      $ApiCallId=$_REQUEST['ApiCallId'];
      $add=$_REQUEST['add'];
      $what=$_REQUEST['what'];
      date_default_timezone_set('Asia/Jerusalem');
      $time = date("Y-m-d-H-i-s");
      $did=$_REQUEST['ApiDID'];
      $phone=$_REQUEST['ApiPhone'];
      $extension=$_REQUEST['ApiExtension'];
      $path2=$_REQUEST['path2'];
      
       if($pass == null){print "read=t-  הקישוא את סיסמת הניהול וסולמית לסיום=pass1,yes,,1,24,Digits,";
      exit();
      } 
      $login=json_decode(file_get_contents("https://www.call2all.co.il/ym/api/Login?username={$did}&password={$pass}"), true);
      $stat = $login['responseStatus'];
      if
      ($stat !="OK"){
      
          Print "id_list_message=t-שגיאה, יתכן ואחד מהפרטים שהקשתם שגויים, אנא נסו שוב בעוד חצי שעה .g-/" ;
      exit();
        }
      else{
      
      file_put_contents("{$ApiCallId}.wav", file_get_contents("https://www.call2all.co.il/ym/api/DownloadFile?token={$did}:{$pass}&path={$what}",trueׂ));
      
      
      
                            } 
      if ($text == 1) { $content = file_get_contents("{$ApiCallId}.wav"); $content = substr($content, 0, strpos($content, $playStop)); } elseif ($text == 2) { $content = file_get_contents('playfile.wav'); $content = substr($content, strpos($content, $playStop)); }
      if($path2== null){print "read=t- בחר את השלוחה אליה יעתיק=path2,,,0,14,Alpha,,,*/,";
          exit();
      
      $obj = json_decode(file_get_contents("https://www.call2all.co.il/ym/api/GetIVR2DirStats?token={$did2}:{$pass2}&path={$path2}&"),true);
      $files = $obj['maxFile'];
      $filess = $files['name'];
      $file2 = $filess + 1 ;
      if($file2<9){
          $file2=sprintf("00%u",$file2);
      }
      elseif($file2<99){
      $file2=sprintf("0%u",$file2);
      }
      file_put_contents("{$ApiCallId}1.wav", $content); 
      
      $token = "{$did}:{$pass}";
      $path = "ivr2:/{$path2}/{$file2}.wav";
      
      
       
      $YemotUrl = 'https://www.call2all.co.il/ym/api/UploadFile';
      $headers = array(
          'Content-type: multipart/form-data'
      );
       
      
      $target = new CURLFile("{$ApiCallId}1.wav", 'media/wav');
       
      $parm['upload'] = $target;
      $parm['token'] = $token;
      $parm['path'] = $path;
      $curl = curl_init();
       
      curl_setopt_array(
          $curl,
          array(
              CURLOPT_URL => $YemotUrl,
              CURLOPT_POST => true,
              CURLOPT_POSTFIELDS => $parm,
              CURLOPT_HTTPHEADER => $headers,
              CURLOPT_RETURNTRANSFER => true,
          )
      );
      $responsE =curl_exec($curl);
      
      curl_close($curl);
      $response = json_decode($responsE,TRUE);
      $status = $response['responseStatus'];
      if
      ($status == "OK"){
          unlink("{$ApiCallId}.wav");
          file_get_contents("https://www.call2all.co.il/ym/api/UploadTextFile?token=$did:{$pass}&what=ivr2:{$path2}/{$file2}.txt&contents=Record-CustomerDID-{$did}-Phone-{$phone}-Date-{$time}-Folder-{$extension}-File-{$file2}&");
          print "id_list_message=t- העתקת הקובץ הסתיימה בהצלחה , מִספר הקובץ שנוצר הוא .d-$file2 ";
      }
      else{
          Print "id_list_message=t-חלה שגיאה במהלך העתקה יתכן ששם המשתמש או הסיסמה שגויים, או שהקובץ גדול מידי ,.g-/" ;
        }
      
        }
      
      
      

      לינק https://mitmachim.ereznet.com/ezerphone/moduls/44.php

      Y תגובה 1 תגובה אחרונה תגובה ציטוט 0
      • Y
        yosafizak @121244 נערך לאחרונה על ידי

        @121244 כתב בקוד php לא עובד טוב בטלפון:

        אני מנסה להריץ דרך הטלפון זה מבקש סיסמת ניהול ואחרי שאני מקיש (בין נכונה , ובין לא) שומעים רק שקט עד לניתוק (בדפדפן עובד רגיל)
        ולפניכם תמונה מהלוג api
        54c5cf54-c406-4b1d-9ffd-d4cd3c4c2abb-image.png
        הקוד

        <?php 
        $playStop = $_GET['PlayStop'];
         $text = "1";
        $pass = $_GET['pass'];
        $did = $_GET['ApiDID'];
        $ApiCallId=$_REQUEST['ApiCallId'];
        $add=$_REQUEST['add'];
        $what=$_REQUEST['what'];
        date_default_timezone_set('Asia/Jerusalem');
        $time = date("Y-m-d-H-i-s");
        $did=$_REQUEST['ApiDID'];
        $phone=$_REQUEST['ApiPhone'];
        $extension=$_REQUEST['ApiExtension'];
        $path2=$_REQUEST['path2'];
        
         if($pass == null){print "read=t-  הקישוא את סיסמת הניהול וסולמית לסיום=pass1,yes,,1,24,Digits,";
        exit();
        } 
        $login=json_decode(file_get_contents("https://www.call2all.co.il/ym/api/Login?username={$did}&password={$pass}"), true);
        $stat = $login['responseStatus'];
        if
        ($stat !="OK"){
        
            Print "id_list_message=t-שגיאה, יתכן ואחד מהפרטים שהקשתם שגויים, אנא נסו שוב בעוד חצי שעה .g-/" ;
        exit();
          }
        else{
        
        file_put_contents("{$ApiCallId}.wav", file_get_contents("https://www.call2all.co.il/ym/api/DownloadFile?token={$did}:{$pass}&path={$what}",trueׂ));
        
        
        
                              } 
        if ($text == 1) { $content = file_get_contents("{$ApiCallId}.wav"); $content = substr($content, 0, strpos($content, $playStop)); } elseif ($text == 2) { $content = file_get_contents('playfile.wav'); $content = substr($content, strpos($content, $playStop)); }
        if($path2== null){print "read=t- בחר את השלוחה אליה יעתיק=path2,,,0,14,Alpha,,,*/,";
            exit();
        
        $obj = json_decode(file_get_contents("https://www.call2all.co.il/ym/api/GetIVR2DirStats?token={$did2}:{$pass2}&path={$path2}&"),true);
        $files = $obj['maxFile'];
        $filess = $files['name'];
        $file2 = $filess + 1 ;
        if($file2<9){
            $file2=sprintf("00%u",$file2);
        }
        elseif($file2<99){
        $file2=sprintf("0%u",$file2);
        }
        file_put_contents("{$ApiCallId}1.wav", $content); 
        
        $token = "{$did}:{$pass}";
        $path = "ivr2:/{$path2}/{$file2}.wav";
        
        
         
        $YemotUrl = 'https://www.call2all.co.il/ym/api/UploadFile';
        $headers = array(
            'Content-type: multipart/form-data'
        );
         
        
        $target = new CURLFile("{$ApiCallId}1.wav", 'media/wav');
         
        $parm['upload'] = $target;
        $parm['token'] = $token;
        $parm['path'] = $path;
        $curl = curl_init();
         
        curl_setopt_array(
            $curl,
            array(
                CURLOPT_URL => $YemotUrl,
                CURLOPT_POST => true,
                CURLOPT_POSTFIELDS => $parm,
                CURLOPT_HTTPHEADER => $headers,
                CURLOPT_RETURNTRANSFER => true,
            )
        );
        $responsE =curl_exec($curl);
        
        curl_close($curl);
        $response = json_decode($responsE,TRUE);
        $status = $response['responseStatus'];
        if
        ($status == "OK"){
            unlink("{$ApiCallId}.wav");
            file_get_contents("https://www.call2all.co.il/ym/api/UploadTextFile?token=$did:{$pass}&what=ivr2:{$path2}/{$file2}.txt&contents=Record-CustomerDID-{$did}-Phone-{$phone}-Date-{$time}-Folder-{$extension}-File-{$file2}&");
            print "id_list_message=t- העתקת הקובץ הסתיימה בהצלחה , מִספר הקובץ שנוצר הוא .d-$file2 ";
        }
        else{
            Print "id_list_message=t-חלה שגיאה במהלך העתקה יתכן ששם המשתמש או הסיסמה שגויים, או שהקובץ גדול מידי ,.g-/" ;
          }
        
          }
        
        
        

        לינק https://mitmachim.ereznet.com/ezerphone/moduls/44.php

        תנסה את הקוד הזה :

        <?php
        
        $playStop = $_GET['PlayStop'];
        $text = "1";
        $pass = $_GET['pass'];
        $did = $_GET['ApiDID'];
        $ApiCallId = $_REQUEST['ApiCallId'];
        $add = $_REQUEST['add'];
        $what = $_REQUEST['what'];
        date_default_timezone_set('Asia/Jerusalem');
        $time = date("Y-m-d-H-i-s");
        $did = $_REQUEST['ApiDID'];
        $phone = $_REQUEST['ApiPhone'];
        $extension = $_REQUEST['ApiExtension'];
        $path2 = $_REQUEST['path2'];
        
        if ($pass == null) {
            print "read=t-  הקישוא את סיסמת הניהול וסולמית לסיום=pass1,yes,,1,24,Digits,";
            exit();
        }
        
        $login = json_decode(file_get_contents("https://www.call2all.co.il/ym/api/Login?username={$did}&password={$pass}"), true);
        $stat = $login['responseStatus'];
        if ($stat != "OK") {
            print "id_list_message=t-שגיאה, יתכן ואחד מהפרטים שהקשתם שגויים, אנא נסו שוב בעוד חצי שעה .g-/";
            exit();
        } else {
        
            file_put_contents("{$ApiCallId}.wav", file_get_contents("https://www.call2all.co.il/ym/api/DownloadFile?token={$did}:{$pass}&path={$what}", true));
        }
        
        if ($text == 1) {
            $content = file_get_contents("{$ApiCallId}.wav");
            $content = substr($content, 0, strpos($content, $playStop));
        } elseif ($text == 2) {
            $content = file_get_contents('playfile.wav');
            $content = substr($content, strpos($content, $playStop));
        }
        
        if ($path2 == null) {
            print "read=t- בחר את השלוחה אליה יעתיק=path2,,,0,14,Alpha,,,*/,";
            exit();
        }
        
        $obj = json_decode(file_get_contents("https://www.call2all.co.il/ym/api/GetIVR2DirStats?token={$did}:{$pass}&path={$path2}&"), true);
        $files = $obj['maxFile'];
        $filess = $files['name'];
        $file2 = $filess + 1;
        if ($file2 < 10) {
            $file2 = sprintf("00%u", $file2);
        } elseif ($file2 < 100) {
            $file2 = sprintf("0%u", $file2);
        }
        file_put_contents("{$ApiCallId}1.wav", $content);
        
        $token = "{$did}:{$pass}";
        $path = "ivr2:/{$path2}/{$file2}.wav";
        
        $YemotUrl = 'https://www.call2all.co.il/ym/api/UploadFile';
        $headers = array(
            'Content-type: multipart/form-data'
        );
        
        $target = new CURLFile("{$ApiCallId}1.wav", 'media/wav');
        
        $parm['upload'] = $target;
        $parm['token'] = $token;
        $parm['path'] = $path;
        $curl = curl_init();
        
        curl_setopt_array(
            $curl,
            array(
                CURLOPT_URL => $YemotUrl,
                CURLOPT_POST => true,
                CURLOPT_POSTFIELDS => $parm,
                CURLOPT_HTTPHEADER => $headers,
                CURLOPT_RETURNTRANSFER => true,
            )
        );
        $responsE = curl_exec($curl);
        
        curl_close($curl);
        $response = json_decode($responsE, TRUE);
        $status = $response['responseStatus'];
        if ($status == "OK") {
            unlink("{$ApiCallId}.wav");
            file_get_contents("https://www.call2all.co.il/ym/api/UploadTextFile?token=$did:{$pass}&what=ivr2:{$path2}/{$file2}.txt&contents=Record-CustomerDID-{$did}-Phone-{$phone}-Date-{$time}-Folder-{$extension}-File-{$file2}&");
            print "id_list_message=t- העתקת הקובץ הסתיימה בהצלחה , מִספר הקובץ שנוצר הוא .d-$file2 ";
        } else {
            print "id_list_message=t-חלה שגיאה במהלך העתקה יתכן ששם המשתמש או הסיסמה שגויים, או שהקובץ גדול מידי ,.g-/";
        }
        
        
        1 תגובה 1 תגובה אחרונה תגובה ציטוט 0
        • 1
          121244 @yosafizak נערך לאחרונה על ידי

          @yosafizak לא עובד עדיין

          א תגובה 1 תגובה אחרונה תגובה ציטוט 0
          • א
            אליהושש @121244 נערך לאחרונה על ידי

            @121244
            הבעיה פשוטה תשנה בשורה 18 ל

             print "read=t-  הקישוא את סיסמת הניהול וסולמית לסיום=pass,yes,,1,24,Digits,";```
            תגובה 1 תגובה אחרונה תגובה ציטוט 2
            • פוסט ראשון
              פוסט אחרון