The url (script) is not using urlencode at all since it is just outputting
text as it is called by the webserver.  If you add urlencode to what it is
going to output, on the web page you get urlencoded output which is of no
use and the phone gets basically gibberish.

In addition to that, it would assume that you have access/control to the
url you are pointing at and could modify it's output.  I would imagine
that people point to many URL's where they have no control over its
output.

There is only one reference to linefeed in the user guide and it is
related to the file command, not get-url.

I know how to work around this without using get-url, I was just curious
what others did to get around this apparent issue using the get-url
function.

> Maybe he needs to do two nested urlencodes: urlencode( urlencode(
> "Hello\nWorld" ) ) because the first url-encoding gets decoded by Kannel?
>
> Shouldn't be neccesary, but wouldn't hurt to try ;)
>
> Regards,
>
> Alejandro
>
> On Tue, Apr 8, 2008 at 4:14 PM, Kevin Reed <[EMAIL PROTECTED]> wrote:
>
>>
>> Not sure if it makes a difference, but he is using get-url to get the
>> contents of a webpage that is outputting linefeeds.
>>
>> The setup is something like:
>>
>>   group = sms-service
>>   keyword = test
>>   get-url = "http://website/getcommands.php";
>>
>> The result which is sent to the phone, doesn't have any linefeeds in it
>> even though that webscript outputs them.  They simply don't get to the
>> phone.
>>
>> Using exec instead of get-url on the same script on the same server
>> directly, works just fine.  The linefeeds get to the phone.
>>
>>   group = sms-service
>>   keyword = test
>>   exec = "/usr/local/bin/php /pathtoscript/getcommands.php"
>>
>> So something in the use of get-url is stripping them.
>>
>> I don't normally use get-url so I never ran into that before.  Note that
>> the php being called is the CLI version not the web version.
>>
>> Perhaps that might shed some light on the issue he is having.
>>
>>
>> > Try with "%0D"
>> >
>> > Regards,
>> >
>> > Alejandro
>> >
>> > On Tue, Apr 8, 2008 at 2:07 PM, Bogus Bill <[EMAIL PROTECTED]>
>> wrote:
>> >
>> >>
>> >>
>> >>
>> >> Juan Nin wrote:
>> >> >
>> >> > again... have you tried chr(13)???
>> >> >
>> >> >
>> >>
>> >>
>> >> Yes, I have.  That didn't work either.
>> >>
>> >> One problem I discovered thanks to Kevin was that I was formatting my
>> >> response using HTML.  I stripped out all the HTML, leaving just text.
>> >>  When
>> >> I run the page from a browser and look at the source, the linefeeds
>> are
>> >> there.  When I let Kannel send it to my phone, the linefeeds are
>> gone.
>>
>>
>>
>>
>



Reply via email to