retriving data - urgent

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
omphilesithole
Posts: 26
Joined: 2015-01-12 13:01

retriving data - urgent

Post by omphilesithole » 2015-02-24 12:29

Hi guys i need your help, am using appgini and i have this code that sends notifications to a mobile, now my problem is that am trying to get the data on the form, am using $title = $data['title']; but its not retrieving the whole infomartion(sentence) on that fiels it displays one word instead of the whole sentence, is the a way to call the data than the way am doing?

// Get cURL resource
$curl = curl_init();

$title = $data['title']; // it cuts the sentence
$message= $data['message']; // it cuts the sentence
$pictureurl= $data['pictureurl']; // dont retrieve at all

// Set some options - we are passing in a useragent too here
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => "http://www.co-safety.co.za/dashboard/no ... pictureurl",
CURLOPT_USERAGENT => 'Codular Sample cURL Request'
));

// Send the request & save response to $resp
$resp = curl_exec($curl);

// Close request to clear up some resources
curl_close($curl);


Thanks

udayvatturi
AppGini Super Hero
AppGini Super Hero
Posts: 85
Joined: 2014-06-14 03:08
Location: India
Contact:

Re: retriving data - urgent

Post by udayvatturi » 2015-02-25 03:29

Hi,
Are you sure that data is getting truncated at the point of receiving only ( $data['title']) or based on the values that you are saving you are saying that.

I would recommend you to encode the data before you send the data, that may solve your issue.
Something like this

Code: Select all

CURLOPT_URL => "http://www.co-safety.co.za/dashboard/notification/sendmessage.php?".urlencode("title=".$title."&message=".$message."&pictureurl=".$pictureurl),

omphilesithole
Posts: 26
Joined: 2015-01-12 13:01

Re: retriving data - urgent

Post by omphilesithole » 2015-02-26 07:56

thank you very much the urlencode help a lot, but i had to put it on this code instead

$title = urlencode ($data['title']); // it cuts the sentence
$message= urlencode ($data['message']); // it cuts the sentence
$pictureurl= urlencode ($data['pictureurl']); // dont retrieve at all

I hope this will help others!

Post Reply