[twitter-dev] Dedicated IP Whitelist

2009-12-08 Thread Jesse Bunch
Hi,

I am on a shared web hosting space, but my domain has a dedicated IP
on the server. Am I correct in saying that the twitter API sees the
dedicated IP address instead of the shared IP address that the server
has? I have been trying very hard to get a twitter API script running
but I get nothing but blank responses from twitter. This makes me
think that my IP has been blacklisted which makes sense if its seeing
the shared IP address that some spammer used to screw things up for
me. I have submitted my dedicated IP to twitter for whitelisting and
they did approve my request, but nothing has changed. Still a blank
response via cURL in PHP. This is a bit frustrating so any advice you
can give me would be much appreciated.

Jesse Bunch
Pixelated Technologies
www.PixelatedTech.com


[twitter-dev] Re: 52: Empty reply from server

2009-11-01 Thread Jesse Bunch

Did you ever get an aswer regarding the empty response from twitter? I
am having the same troubles.


On Oct 31, 7:13 am, shiplu shiplu@gmail.com wrote:
 On Fri, Oct 30, 2009 at 6:01 PM, Alexander Sergeyev

 a.serge...@gmail.com wrote:

  Hello!

  I got the same problem.
  During half-hour after reboot, server works good, all the requests
  send to Twitter API using cURL returned. But after, server received an
  empty reply. This problem is repeating in a half of tryes. If i reboot
  web-server, the problem disappears for a short time.

 My problem is not solved yet. Still looking for ways to resolve it. I
 told a...@twitter.com and waiting for reply.
 If reboot is the solution, it can not be accepted. A production server
 should not be rebooted that frequently.

 --
 A K M Mokaddimhttp://talk.cmyweb.nethttp://twitter.com/shiplu
 Stop Top Posting !!
 বাংলিশ লেখার চাইতে বাংলা লেখা অনেক ভাল


[twitter-dev] Twitter API Returning Nothing

2009-11-01 Thread Jesse Bunch

Hello, here is my cURL output from the response. Its empty! I am
attaching both the code used and the response. I have been at this for
hours and cannot find out why this is happening. Thanks for your help.

TWITTER API CURL RESPONSE
url :: http://twitter.com/statuses/update.xml?status=test+agasdf
content_type ::
http_code :: 0
header_size :: 0
request_size :: 0
filetime :: -1
ssl_verify_result :: 0
redirect_count :: 0
total_time :: 0
namelookup_time :: 0.060027
connect_time :: 0
pretransfer_time :: 0
size_upload :: 0
size_download :: 0
speed_download :: 0
speed_upload :: 0
download_content_length :: -1
upload_content_length :: -1
starttransfer_time :: 0
redirect_time :: 0

CODE USED TO SEND REQUEST TO TWITTER
?php

// A simple function using Curl to post (GET) to Twitter
// Kosso : March 14 2007

function postToTwitter($username,$password,$message){

$host = http://twitter.com/statuses/update.xml?status=.urlencode
(stripslashes(urldecode($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_exec($ch);
// Look at the returned header
$resultArray = curl_getinfo($ch);

curl_close($ch);

if($resultArray['http_code'] == 200){
 $twitter_status='Your message has been sent! a href=http://
twitter.com/'.$username.'See your profile/a';
} else {
 $twitter_status=Error posting to Twitter. Retrybrbr;
foreach ($resultArray as $key = $value) {
$twitter_status .= $key .  ::  . $value . 
br;
}
}
return $twitter_status;
}
?