CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 How to retrieve data sned to php

Print topic Send  topic

Author Message
fesunil

Posts: 1
Posted: 09/21/2013, 4:55 AM

Need help: please let me know where I am going wrong?

I am using cloud based telephony application. On every incoming call, the application sends call data to hurl. It makes a GET request to the URL with the call details as URL-encoded HTTP query parameters.
I want to push that call data to MySQL hosted on web. For that I am using a php.

The Telephone Application passes the call details to the URL configured
It makes a GET request to the URL with the call details as URL-encoded HTTP query parameters.

Example:
"GET /pass-through.php?CallSid=1321360773.4&From=09880847047&To=08088919888&Direction=incoming&DialCallDuration=7&StartTime=2011-11-15+18%3A09%3A41&EndTime=0000-00-00+00%3A00%3A00&CallType=call&DialWhomNumber=09052161119&digits=%2289%22 HTTP/1.1"

pass-through.php code
<?php
$dbhost = 'freshex.in';
$dbuser = 'freshex_FEUser';
$dbpass = 'GUhN@S79XWH&';
$dbname = 'freshex_FExotel';
$conn = mysql_connect($dbhost, $dbuser, $dbpass, $dbname);
if (!$conn)
{
die('Could not connect:'.mysql_error());
}
mysql_select_db($dbname,$conn);
if(isset($_GET['CallSid']))
$vCallSid=$_GET['CallSid'];
if(isset($_GET['From']))
$vFrom=$_GET['From'];
if(isset($_GET['To']))
$vTo=$_GET['To'];
if(isset($_GET['Direction']))
$vDirection=$_GET['Direction'];
if(isset($_GET['CallType']))
$vCallType=$_GET['CallType'];
mysql_query("INSERT INTO `DataExotel`(`vCallSid`, `vFrom`, `vTo`, `vDirection`, `vCallType`) VALUES (`$vCallSid`, `$vFrom`, `$vTo`, `$vDirection`, `$vCallType`)");
?>
View profile  Send private message
JessicaRobort

Posts:
Posted: 09/24/2013, 2:21 AM

i dont find anything wrong in the code
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.