Archive

Posts Tagged ‘special characters’

Entering a new line into an SMS message

October 8th, 2009

Sometimes it will be neccessary for your text messages to carry a newline to break up content. In order to do this you will need to send a url escaped carriage return character, followed by a url escaped line feed character.

Please find the particular url escaped string below:
%0D%0A
%0D is the carriage return.
%0A is the line feed.

If you have any questions on this, please let us know, either by mail to smsapi@hostingireland.ie or on our forum or comment below.

text messages development

Non alphanumeric characters

August 27th, 2009

When a request to send an SMS is received by our gateway, it is processed by HTTP and some characters can commonly cause errors, which may lead to unpredictable results from your request.

To correct this issue, you should urlencode the message you want to send, so that the HTTP does not interfere with the message, this involves re-writing the message with characters such as & (ampersand) and # (hash) replaced with %23, %26 and so on. If your SMS program is written using PHP, there is a prebuilt function for performing this, which you can see here:
http://ie2.php.net/urlencode

It is important however, that you initially change spaces to ‘+’ before url encoding the message.

As usual, if you have any questions regarding this technology, or anything related to the Hosting Ireland SMS Gateway API, either comment below, or in our forum or email smsapi@hostingireland.ie.

text messages development , ,