randomguy1234 Posted July 14, 2012 Share Posted July 14, 2012 So, basically, I'm trying to send a GET form through CURL. Let's say my link is this: $link = "www.example.com?&rand=¬FirstTime=false&transaction_id=$transactionid&house_type=HOUSE_HOUSE"; curl_setopt($ch, CURLOPT_URL, $link); $html = curl_exec($ch); Now, this appeared to work fine, but after I ran a little debugging test, I found out that the "¬" in the link turns into a character, which messes up all the next variables following it, thus they are not sent. One way to dodge this would be to put it in the end, but sometimes things may not be that easy. Currently I'm going for that solution, but I'd like to find another solution for this, in case I have to have two "¬-s" in the link. "echo curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);" outputs: www.example.com?&rand=?FirstTime=false&transaction_id=$transactionid&house_type=HOUSE_HOUSE Now I tried replacing "&" with "&", which seemed to work, but later I found out, that then "$transactionid" will be bugged and not sent. I'm not aware how should I use htmlentities in this case, because I tried it and nothing changed. //"?" being shown instead of the real character in the code I provided. Quote Link to comment https://forums.phpfreaks.com/topic/265674-curl-not-returns-a-special-character/ Share on other sites More sharing options...
lordshoa Posted July 14, 2012 Share Posted July 14, 2012 do you need to urlencode your post ? Quote Link to comment https://forums.phpfreaks.com/topic/265674-curl-not-returns-a-special-character/#findComment-1361525 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.