php


can't receive webhooked data


I am trying to use webhook to receieve data from a sms service provider.the hooked URL is http://exmple.com/xy/myphp.php and my myphp.php is as follows:
<?php
$con = new mysqli("server","uname","pass","db");
error_reporting(0);
$request = $_REQUEST["data"];
$jsonData = json_decode($request,true);
foreach($jsonData as $key => $value)
{
// request id
$requestID = $value['requestId'];
$userId = $value['userId'];
$senderId = $value['senderId'];
foreach($value['report'] as $key1 => $value1)
{
//detail description of report
$desc = $value1['desc'];
// status of each number
$status = $value1['status'];
// destination number
$receiver = $value1['number'];
//delivery report time
$date = $value1['date'];
$sql="INSERT INTO `delivary_report`(`request_id`, `user_id`, `sender_id`,`date`,`receiver`,`status`,`description`) VALUES('$requestID','$userId','$senderId','$date','$receiver','$status','$desc')";
$res=$con->query($sql);
}
}
//echo $request;
?>
the sms service provider is saying that they can get 406 error. please tell me how to solve this issue. currently i am using godaddy shared server. the json formated data they are sending looks like the follows.
data=[
{
"requestId":"35666a716868323535323239",
"userId":"38229",
"report":[
{
"desc":"REJECTED",
"status":"16",
"number":"91XXXXXXXXXX",
"date":"2015-06-10 17:09:32.0"
}
],
"senderId":"tester"
},
{
"requestId":"35666a716868323535323239",
"userId":"38229",
"report":[
{
"desc":"REJECTED",
"status":"16",
"number":"91XXXXXXXXXX",
"date":"2015-06-10 17:09:32.0"
},
{
"desc":"REJECTED",
"status":"16",
"number":"91XXXXXXXXXX",
"date":"2015-06-10 17:09:32.0"
}
],
"senderId":"tester"
}
]

Related Links

database values are not displaying in android spinner
PHP Dropdown Option “Selected”
Ajax/jquery/php: one product with different color with different pictures
Grouping cities by name with different formats
How to download and upload SQL database as .sql file using php?
Warning: mysqli_connect() expects parameter 5 to be long, string given in
PHP saving sessions but
Pick a file without file name using url rewrite
PHP Simple HTML Dom hyphenated attribute with “find”
Symfony 2 stop saving form process
Directing HTTP requests to HTTPS if initial connection is HTTPS but not if it is HTTP
Laravel-Bootstrap Starter Site content management
“set names” vs mysqli_set_charset — besides affecting mysqli_escape_string, are they identical?
How to turn day number to a word (letters) with ireport?
How to pass variables from one page to another in Symfony2
how to list files in a directory without redirecting to index.php file?

Categories

HOME
openshift
softlayer
devexpress
mousemove
apk
vsts-build
yql
fogbugz
cypher
biztalk-2010
apache-kafka-connect
jint
repair
gprs
colors
buffer
smartgwt
complexity-theory
pygobject
closures
asciimath
exe
playframework-2.0
nose
http-authentication
spring-ldap
sipp
web-config-transform
data-collection
history.js
xenapp
toad
steam-web-api
private-key
xmlunit
gnu-classpath
cups
redgate
ms-dos
microsoft-ui-automation
recovery
sbjson
praat
icepdf
distributed-caching
hypothesis-test
nomad
react-intl
daz3d
webalizer
nslayoutconstraint
dtd
lvalue
degrees
ltrace
email-injection
elastic4s
callouts
traversable
cdo.message
jtag
static-methods
powerpoint-2013
rails-engines
timestamping
persistent-object-store
astropy
screen-orientation
jnlp
360-degrees
clarion
quercus
gflags
shell-extensions
dnsjava
rubber
berkeley-db-xml
ecos
treeline
accessory
refit
miglayout
flipboard
map
assetic
strdup
particle-swarm
compiler-flags
ggts
jquery-lazyload
rikulo
html-frames
web-frameworks
jbox2d
ntlmv2
linkbutton
clearinterval
kaazing
flymake
wiktionary
photo-management
downloadfile
webclient.uploaddata
synthesizer

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App