senyo Posted November 10, 2009 Share Posted November 10, 2009 I got a problem with curl, is not sending all the data, that I have stored in a string. What to do? Link to comment https://forums.phpfreaks.com/topic/181033-curl-not-sending-all-the-data/ Share on other sites More sharing options...
salathe Posted November 10, 2009 Share Posted November 10, 2009 Ask curl very nicely? Without knowing what you're doing (perhaps, doing wrong) we can't help you. Link to comment https://forums.phpfreaks.com/topic/181033-curl-not-sending-all-the-data/#findComment-955158 Share on other sites More sharing options...
senyo Posted November 10, 2009 Author Share Posted November 10, 2009 Her is the code, $email=$emailadress; $subject =$sub; $message = $rezult; if(isset($_POST['subject'])) $subject = $_POST['subject']; if(isset($_POST['email'])) $email = $_POST['email']; if(isset($_POST['message'])) $message= htmlentities($_POST['message']); $Curl_Session = curl_init('mail.php'); curl_setopt ($Curl_Session, CURLOPT_POST, 1); curl_setopt ($Curl_Session, CURLOPT_POSTFIELDS,"subject=$subject&email=$email&message=$message"); curl_setopt ($Curl_Session, CURLOPT_FOLLOWLOCATION, 1); curl_exec ($Curl_Session); curl_close ($Curl_Session); I always format the text, using this so all the text that is in the $message has the same format, using echo it shows the right text, but it doesn't send all the text only a couple of words that are in different places $rezult=mb_convert_encoding($data,"HTML-ENTITIES","utf-8"); Link to comment https://forums.phpfreaks.com/topic/181033-curl-not-sending-all-the-data/#findComment-955181 Share on other sites More sharing options...
senyo Posted November 11, 2009 Author Share Posted November 11, 2009 Apparently curl stops sending the data when it encounters a strange symbol. Is there another way of sending data? Link to comment https://forums.phpfreaks.com/topic/181033-curl-not-sending-all-the-data/#findComment-955724 Share on other sites More sharing options...
salathe Posted November 11, 2009 Share Posted November 11, 2009 Make sure the POST data is urlencoded. Link to comment https://forums.phpfreaks.com/topic/181033-curl-not-sending-all-the-data/#findComment-955729 Share on other sites More sharing options...
senyo Posted November 11, 2009 Author Share Posted November 11, 2009 it doesn't work, the POST data is text, Link to comment https://forums.phpfreaks.com/topic/181033-curl-not-sending-all-the-data/#findComment-955739 Share on other sites More sharing options...
senyo Posted November 11, 2009 Author Share Posted November 11, 2009 Do I need another curl script to send the data? or can I do it without curl? Link to comment https://forums.phpfreaks.com/topic/181033-curl-not-sending-all-the-data/#findComment-955773 Share on other sites More sharing options...
salathe Posted November 11, 2009 Share Posted November 11, 2009 it doesn't work, the POST data is text, What did you change and how does it not work? Link to comment https://forums.phpfreaks.com/topic/181033-curl-not-sending-all-the-data/#findComment-955776 Share on other sites More sharing options...
mrMarcus Posted November 11, 2009 Share Posted November 11, 2009 give an example of a $message that isn't being fully sent. Link to comment https://forums.phpfreaks.com/topic/181033-curl-not-sending-all-the-data/#findComment-955778 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.