@ivrפון
צריך לשלוח גם סוג קובץ, להלן הקוד המתוקן
<?php
$ApiDID=$_GET['ApiDID'];
$pass=$_GET['pass'];
$path1=$_GET['path1'];
$path2=$_GET['path2'];
$tiz=$_GET['tiz'];
$what=$_GET['what'];
$file_type=$_GET['type'];
$token="$ApiDID:$pass";
$obj = json_decode(file_get_contents("https://www.call2all.co.il/ym/api/GetIVR2DirStats?token={$token}&path=ivr2:{$path2}&"),true);
$ok= $obj["responseStatus"];
if($ok=="OK"){
$fi = $obj['maxFile'];
$filess = (int)$fi['name'];
if($filess != null){
$fil = $filess + 1 ;
}
if($fil<9){
$fil=sprintf("00%u",$fil);
}
elseif($fil<99){
$fil=sprintf("0%u",$fil);
}
}
else{
print"id_list_message=m-1080";
exit;
}
$url=json_decode(file_get_contents("https://www.call2all.co.il/ym/api/FileAction?token={$token}&what=ivr2:{$path1}/{$what}.{$file_type}&target=ivr2:{$path2}/{$fil}.{$file_type}&action=copy"),true);
$ok1= $url["responseStatus"];
if($ok1=="OK"){
$url2=file_get_contents("https://www.call2all.co.il/ym/api/RunTzintuk?token={$token}&TzintukTimeOut=8&phones=tzl:{$tiz}");
$data = json_decode($url2, true);
$ok2= $data["responseStatus"];
if($ok2=="OK"){
print"id_list_message=m-2573";
}
else{
print"id_list_message=m-1081.";
}
}else{
print"id_list_message=m-1080.";
exit;
}
?>
וההגדרות בשלוחה
type=api
api_link=https://ivrphone.online/admin.php
api_add_0=pass=****
api_add_1=path1=2
api_add_2=what=000
api_add_3=path2=3
api_add_4=tiz=1
api_add_5=type=wav