Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 6:32 am
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: how to use "select country" search in display rate card api
PostPosted: Wed Mar 17, 2010 3:41 am 
Offline

Joined: Wed Dec 09, 2009 3:50 pm
Posts: 8
Has anyone been successful in getting the v1.4 ratecard to display on their website? I am still struggling to get it to display on my website for quite sometime now without success.

Thanks in advance for sharing your knowledge.

BTW, below are the messages I receive in Apache error log. Not sure what is preventing the script from running - all I get is a blank page.

**********************************************************************************
[Wed Mar 17 00:26:38 2010] [error] [client x.x.x.x] PHP Warning: include() [<a href='function.include'>function.include</a>]: URL file-access is disabled in the server configuration in /var/www/html/rates.php on line 18
[Wed Mar 17 00:26:38 2010] [error] [client x.x.x.x] PHP Warning: include(http://my IP address/webservice/display_ratecard.php?key=my key&amp;page_url=https://my IP address/rates.php&amp;&amp;field_to_display=t1.destination,t1.dialprefix,t1.rateinitial&amp;&amp;column_name=Destination,Prefix,Rate/Min&amp;&amp;currency_select=USD&amp;&amp;field_type=,,money&amp;) [<a href='function.include'>function.include</a>]: failed to open stream: no suitable wrapper could be found in /var/www/html/rates.php on line 18
[Wed Mar 17 00:26:38 2010] [error] [client x.x.x.x] PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening 'http://my IP address/webservice/display_ratecard.php?key=my key&amp;page_url=http://my IP address/rates.php&amp;&amp;field_to_display=t1.destination,t1.dialprefix,t1.rateinitial&amp;&amp;column_name=Destination,Prefix,Rate/Min&amp;&amp;currency_select=USD&amp;&amp;field_type=,,money&amp;' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/rates.php on line 18


Top
 Profile  
 
 Post subject: Re: how to use "select country" search in display rate card api
PostPosted: Tue Apr 06, 2010 5:26 pm 
Offline

Joined: Sun Aug 09, 2009 3:10 pm
Posts: 2
Change the following in your php.ini file.

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = On

Good luck!


Top
 Profile  
 
 Post subject: Re: how to use "select country" search in display rate card api
PostPosted: Sat May 01, 2010 4:21 am 
Offline

Joined: Wed Dec 09, 2009 3:50 pm
Posts: 8
Thank you Orison. It still didn't work for me. However, I finally found a workaround by tweaking the sample display_ratecard.php. It's not pretty but it works. Below is the code I managed to get to work for me incase anyone finds it helpful:
-----------------------------------------------------
<?php
function open_url($url)
{
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 0);
ob_start();
curl_exec ($ch);
curl_close ($ch);
$string = ob_get_contents();
ob_end_clean();
return $string;
}

$api_url = "http://www.your site/webservice/display_ratecard.php?".
"key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".
"&page_url=https://www.your site/rates.php&".
"&field_to_display=t1.destination,t1.dialprefix,t1.rateinitial&".
"&column_name=Destination,Prefix,Rate/Min&".
"&currency_select=USD&".
"&field_type=,,money&".
"&".$_SERVER['QUERY_STRING'];
$content = open_url ($api_url);
print ($content);?>


Top
 Profile  
 
 Post subject: Re: how to use "select country" search in display rate card api
PostPosted: Tue Jun 08, 2010 10:24 am 
Offline

Joined: Wed Nov 25, 2009 12:01 pm
Posts: 90
hi..what sort of tweek you did?
i'm keep getting
Forbidden
You don't have permission to access /a2billing/webservice/display_ratecard.php


this is what i have:

<?php
function open_url($url)
{
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 0);
ob_start();
curl_exec ($ch);
curl_close ($ch);
$string = ob_get_contents();
ob_end_clean();
return $string;
}

$api_url = "http://192.168.1.4/a2billing/webservice/display_ratecard.php?".
"key=E2A6C8A0790F6DE314886F062DB1F220".
"&page_url=https://192.168.1.4/rates.php&".
"&field_to_display=t1.destination,t1.dialprefix,t1.rateinitial&".
"&column_name=Destination,Prefix,Rate/Min&".
"&currency_select=USD&".
"&field_type=,,money&".
"&".$_SERVER['QUERY_STRING'];
$content = open_url ($api_url);

thanks.


Top
 Profile  
 
 Post subject: ratecard API
PostPosted: Tue Sep 06, 2011 12:36 am 
Offline

Joined: Thu Aug 20, 2009 4:17 pm
Posts: 5
I know its a really old post, however may be useful for someone like me.
To fix this issue, configure the .htaccess as per your need or just remove it under the webservice directory.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Auto Dialer Software


All times are UTC


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group