Hi You need to use urlencode($message) instead of str_replace(...).
Regards Alvaro |-----------------------------------------------------------------------------------------------------------------| Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier celular y Nextel en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via SMS y GPRS online Visitenos en www.perusms.com On Thu, Mar 20, 2014 at 1:35 PM, anurag joshi <anuragajo...@gmail.com> wrote: > Hello there, > > > I am using a web(html) page to read an input message from user than that > html will send the data to another php created by me: that php will do some > refine work like adding country code to the number, database check....and than > the php will actual call the http://localhost/xxxxx/sendsms and the message > will be sent. > > > but whenever a new line character is used in the message box in web page, > the message don't get delivered, it returns an error code 1. > > > please help. > > > Things I already know: The spaces from message(from web) has to be converted > to "+" for that I am using str_replace(" ","+",$message); everything work > fine with spaces present > > But I don't know how to treat the new line characters. > > > -- > Thank you > anurag > +91 99008 35849 > Sent with Sparrow >