PHP Twitterbot不发推文?

UPDATE: I have re-written this bot and a working version is available here.

I was hoping someone could help me with this code. I have already read a post on here which advised to make some changes which i have, but still nothing is retweeting? What i want to do is retweet via a cron job based on maybe a hashtag or a username. I want to set up a couple of these bots that will run on different days, just 1 post a day. Now i have this code:

<?php
require_once('twitteroauth.php');

define('CONSUMER_KEY', 'insert_your_consumer_key_here');
define('CONSUMER_SECRET', 'insert_your_consumer_secret_here');
define('ACCESS_TOKEN', 'insert_your_access_token_here');
define('ACCESS_TOKEN_SECRET', 'insert_your_access_token_secret_here');

$twitter = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);

/*The search has change a little bit */

/* Remove this 2 lines */
/* $twitter->host = "http://search.twitter.com/"; */
/* $search = $twitter->get('search', array('q' => '@repor_taxi', 'rpp' => 15)); */

/* Put this new line */
$search = $twitter->get("https://api.twitter.com/1.1/search/tweets.json?q=webdesign&count=1");

/* The Search URL is https://api.twitter.com/1.1/search/tweets.json?q= */
/* Everything after is parameter */
/* You can check parameters list here: https://dev.twitter.com/docs/using-search */

/* Twitter host updated too */
$twitter->host = "https://api.twitter.com/1.1/";


foreach($search->results as $tweet) {
    $status = 'RT @'.$tweet->from_user.' '.$tweet->text;
    if(strlen($status) > 140) $status = substr($status, 0, 139);
    $twitter->post('statuses/update', array('status' => $status));
}

echo "Success! Check your twitter bot for retweets!";

Does anyone know of the correct way to get this to work? At the minute it is showing me the success message, so the code is running, but nothing is being tweeted.

I'm new to the twitter API so any help would be really appreciated.