Welcome to WebmasterWorld Guest from 50.19.190.144

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

XML message as variable in URL

XML message as variable in URL

     
2:56 pm on Jun 1, 2010 (gmt 0)

New User

5+ Year Member

joined:June 1, 2010
posts: 7
votes: 0


Hi,

I am writing a PHP script to receive SMS from my SMS gateway.

My SMS gateway uses the following URL to post message to my server.


http://www.yourserver.com/incomingsms.php?xml=<?xml version="1.0" encoding="UTF-8" ?><TRUMPIA> <phonenumber>1234567890</phonenumber> <keyword>keyword</keyword> <contents>contents</contents> </TRUMPIA>


In my incomingsms.php file if I get the value of xml using $_GET["xml"] I am not getting the XML code. I only get 1234567890 keyword contents. It strips all the xml tags.

Since I am developing my php in a generic way, I need to get the whole xml message and I need to identify tag phonenumber to get the phone number and keyword tag to get the value of keyword and so on.

Could someone please help on this?

Regards
Malai
6:27 pm on June 1, 2010 (gmt 0)

Full Member

5+ Year Member

joined:Aug 17, 2007
posts:320
votes: 0


Are you sure your browser isn't just parsing the data like this, if you view source you may see the tags.
8:47 pm on June 7, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 29, 2008
posts: 65
votes: 0


Hi,

There seem to be an error some where it makes no sense just to post XML as part of an URL.

Can you get the URL directly from your gateway?, so that you can use simpleXML library to import the XML

If you have to keep posting the XML thur the browser can you get the XML feed serialized and encoded?
10:21 pm on Aug 12, 2010 (gmt 0)

New User

5+ Year Member

joined:Aug 12, 2010
posts:1
votes: 0


malaiselvan,

Did you find a solution for your SMS problem?
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members