Re: CCIVR - callcom php
Posted: 08 Jun 2016 03:36
hello guys,
I solved the problem:)
The problem was not in the php script, was from the how I build the query in "callcom".
The right way to be build the query is: <$phone='phone='+$callnb> where $callnb=$[BB]ReceivePhoneCall.callingNumber.
I used the wrong syntax for query <$phone=$callnb> equivalent in IE with <http://localhost/check_phone.php?012345678>.
the final php script is:
<?php
$phone=$_GET['phone'];
fopen('c:\Y\White_PhoneList.csv','rb');
$file=file_get_contents('c:\Y\White_PhoneList.csv');
if(strpos($file, $phone)!==false)
{
echo "OK";
}
else
{
echo "NO";
}
fclose($handler);
?>
Thank you so much for your help and involvement.
I solved the problem:)
The problem was not in the php script, was from the how I build the query in "callcom".
The right way to be build the query is: <$phone='phone='+$callnb> where $callnb=$[BB]ReceivePhoneCall.callingNumber.
I used the wrong syntax for query <$phone=$callnb> equivalent in IE with <http://localhost/check_phone.php?012345678>.
the final php script is:
<?php
$phone=$_GET['phone'];
fopen('c:\Y\White_PhoneList.csv','rb');
$file=file_get_contents('c:\Y\White_PhoneList.csv');
if(strpos($file, $phone)!==false)
{
echo "OK";
}
else
{
echo "NO";
}
fclose($handler);
?>
Thank you so much for your help and involvement.