PHP & uClassify bug estranho

Tenho um script php com o código abaixo

require_once("uClassify.php");

$name = $_POST['name'];

$uclassify = new uClassify();

// Set these values here
$uclassify->setReadApiKey('my-read-key');
$uclassify->setWriteApiKey('my-write-key');

$text=str_replace(" ", "+", $name);

$google_url = "http://uclassify.com/browse/uClassify/Sentiment/ClassifyText?readkey=My-Read-Key&text=".$text."&version=1.01";

$result = file_get_contents($google_url);

$resp = $uclassify->classify('Understanding if a text is positive or negative is easy for humans, but a lot harder for computers. We can “read between the lines”, get jokes and identify irony. Computers aren’t quite there yet but the gap is quickly closing in.', 'Sentiment', 'uClassify');


print_r($resp);

Quando o executo usando o console, recebo a resposta abaixo

Array
(
    [0] => Array
        (
            [id] => Classify2414835871331563718
            [classification] => Array
                (
                    [0] => Array
                        (
                            [class] => negative
                            [p] => 0.0650294
                        )

                    [1] => Array
                        (
                            [class] => positive
                            [p] => 0.934971
                        )

                )

            [text] => Understanding if a text is positive or negative is easy for humans, but a lot harder for computers. We can “read between the lines”, get jokes and identify irony. Computers aren’t quite there yet but the gap is quickly closing in.
        )

)

ok até agora, mas quando tento usá-lo na minha página usando um formulário e obtendo a resposta na mesma página, nada aparece. Se eu comentar a linha

$resp = $uclassify->classify('Understanding if a text is positive or negative is easy for humans, but a lot harder for computers. We can “read between the lines”, get jokes and identify irony. Computers aren’t quite there yet but the gap is quickly closing in.', 'Sentiment', 'uClassify');

e eco algo tudo funciona muito bem novamente.

aqui está o script no meu arquivo html

<script type="text/javascript">
        $(document).ready(function() {

            $('#convert').click(function(){
                var name = $('#name').val();    

                $.ajax({
                type: "POST",
                url: "examplet.php",
                data: {
                    "name": name
                },
                success: function(data){
                $('#results').show();

                $('#results').html(data);
                if(data == 'Η καταχώρηση έγινε επιτυχώς, ευχαριστούμε!'){
                    $('#name').val('');
                }

            }
         });

        });
        });     
</script>

questionAnswers(0)

yourAnswerToTheQuestion