In my server I have enabled curls, even using some contact grabber and paypal, And so many applications with curls,
But I do not know why this is showing the response to Twitter 417
This is my snippet,
$ host = "" .urlencode (StripSlocks (urdodel) ($ message))); $ Ch = curl_init (); Curl_setopt ($ CH, CURLOPT_URL, host $); Curl_setopt ($ CH, CURLOPT_VERBOSE, 1); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ ch, CURLOPT_USERPWD, "$ username: $ password"); Curl_setopt ($ CH, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); Curl_setopt ($ CH, CURLOPT_POST, 1); $ Result = curl_xac ($ CH); // See return header at $ resultArray = curl_getinfo ($ ch); Curl_close ($ ch); If ($ result here [[http_code]] == "200") {$ twitter_status = 'Your message has been detected! '; } And {$ twitter_status = "Error posting on Twitter. Try again"; } Return $ twitter_status;
But the work of this snippet working in the local system,
Please tell me, there is nothing wrong with the snippet,
Also include this line in your code:
curl_setopt ($ ch, CURLOPT_HTTPHEADER, array (' Expectation of:'));
Comments
Post a Comment