无法使用file_get_content或cURL来运行php脚本

I have this issue please. I use this script here to send an automatic SMS:

<?php
function get_data($url) {
    $ch = curl_init();
    $timeout = 5;
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}

$returned_content = get_data('http://url.goes.here:8080/bulksms/bulksms?username=user&passwd=password&type=0&dlr=1&destination=phone&source=FLM&message=hello');
?>

The issue is, if i submit the URL directly i get something like:

1701|355662080090|a2406d38-1baf-42a2-a1a5-e5798859e400

And a sms arrives to my phone, but if i use the above methods i won't get the sms.. Anyone can suggest me why is so? Thanks..

If you DO have allow_url_fopen activated in your php.ini, then you should look into changing the user agent for the request (use cURL). Many SMS gateways use user agent filtering when processing their requests... Correct me if I am wrong, but I suppose you use RouteSMS, right?