<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[DevLog]]></title><description><![CDATA[DevLog]]></description><link>https://devlog.kocbek.com</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 19:07:43 GMT</lastBuildDate><atom:link href="https://devlog.kocbek.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[SMS using PHP Clickatell REST API]]></title><description><![CDATA[I've had many issues regarding this. Even contacted their support. First we had to move away from HTML GET request which was very simple and fast, but uses only ASCII characters. Since company client communicates in many countries with different char...]]></description><link>https://devlog.kocbek.com/sms-using-php-clickatell-rest-api</link><guid isPermaLink="true">https://devlog.kocbek.com/sms-using-php-clickatell-rest-api</guid><category><![CDATA[PHP]]></category><category><![CDATA[REST API]]></category><dc:creator><![CDATA[Jan Kocbek]]></dc:creator><pubDate>Thu, 09 Dec 2021 23:19:23 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/HbyYFFokvm0/upload/v1639091579838/DBn-O9va-.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I've had many issues regarding this. Even contacted their support. First we had to move away from HTML GET request which was very simple and fast, but uses only ASCII characters. Since company client communicates in many countries with different charcodes we had to find a way to send SMS. </p>
<p>Amazon SNS says: "Each SMS message can contain up to 140 bytes, and the character quota depends on the encoding scheme. For example, one SMS message can contain:
160 GSM characters or 
140 ASCII characters or 
70 UCS-2 characters"</p>
<h3 id="heading-clickatellcom">Clickatell.com</h3>
<p>First check <a target="_blank" href="https://docs.clickatell.com/channels/sms-channels/sms-api-reference/#tag/SMS-API">SMS-API Documentation</a> and setup simple REST call.</p>
<p> <a target="_blank" href="https://docs.clickatell.com/archive/">Archive of documentation</a> 
I had to browse some documentation and found the answer at  <a target="_blank" href="https://docs.clickatell.com/archive/channels/advanced-message-send-archived/multi-language-unicode-messaging/">Advanced message send / Multi-language Unicode messaging</a> </p>
<p>So for characters other than regular GSM characterset Clickatell expects UCS-2 (Big Endian) character encoding and unicode=1 parameter set. So <strong>70 characters will be the limit</strong>. We will have to split the messages since our messages consist of up to <strong>180 characters</strong>.</p>
<p>PHP code to convert UTF-8 text to HEX encoded UCS-2 acceptable by Clickatell:</p>
<pre><code>$message = bin2hex(mb_convert_encoding($text, <span class="hljs-string">"UCS-2"</span>, <span class="hljs-string">"UTF-8"</span>));
</code></pre>]]></content:encoded></item><item><title><![CDATA[When all seems to fail....]]></title><description><![CDATA[Try this list:
Clear browser cache with cookies
Delete local template, css, js cached files
Log-out, Log-in from app to delete session non cookie storage
Delete Windows Apache DB cache
C:\Users[Username]\AppData\Local\Temp\cache\]]></description><link>https://devlog.kocbek.com/when-all-seems-to-fail</link><guid isPermaLink="true">https://devlog.kocbek.com/when-all-seems-to-fail</guid><category><![CDATA[debugging]]></category><dc:creator><![CDATA[Jan Kocbek]]></dc:creator><pubDate>Wed, 08 Dec 2021 09:20:37 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/heNwUmEtZzo/upload/v1638954944031/6kkUiiptL.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-try-this-list">Try this list:</h1>
<h2 id="heading-clear-browser-cache-with-cookies">Clear browser cache with cookies</h2>
<h2 id="heading-delete-local-template-css-js-cached-files">Delete local template, css, js cached files</h2>
<h2 id="heading-log-out-log-in-from-app-to-delete-session-non-cookie-storage">Log-out, Log-in from app to delete session non cookie storage</h2>
<h2 id="heading-delete-windows-apache-db-cache">Delete Windows Apache DB cache</h2>
<p>C:\Users[Username]\AppData\Local\Temp\cache\</p>
]]></content:encoded></item><item><title><![CDATA[Developer blogging for free]]></title><description><![CDATA[Hi. I've just started this. It looks promising. 

I can edit this anytime :)]]></description><link>https://devlog.kocbek.com/developer-blogging-for-free</link><guid isPermaLink="true">https://devlog.kocbek.com/developer-blogging-for-free</guid><category><![CDATA[Developer]]></category><category><![CDATA[Blogging]]></category><dc:creator><![CDATA[Jan Kocbek]]></dc:creator><pubDate>Wed, 08 Dec 2021 07:21:48 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/cckf4TsHAuw/upload/v1638955738055/mRnNaB0K3W.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Hi.</strong> I've just started this. It looks promising. 
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638949052906/WyFTo2a9v.png" alt="blog.png" />
I can edit this anytime :)</p>
]]></content:encoded></item></channel></rss>