How to communicate with SMS gateway via PHP
<p>I have a link I need users to click in order for them to receive a text message. The URL points to an external link so I can't mask it. At present when a user clicks on the link I redirect them to the external site to send the message, but I do not wish to do this as I don't want the user to see the external URL.</p>

<p>I have tried to use <code>file_get_contents()</code> and cURL but I have been unable to get either mechanism to work. When I load the page in the browser I get the text response "OK", when I use PHP to make the request I get the "OK" response from the server but I do not receive the text message to my phone.</p>

<p>Here is the cURL code I have tried:</p>

<pre><code>$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$output = curl_exec($ch);
curl_close($ch);

return $output;
</code></pre>
