[ create a new paste ] login | about

Link: http://codepad.org/pkzsfsMk    [ raw code | output | fork ]

PHP, pasted on May 28:
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php

$xml = '<rsp stat="ok"> 
<success msg="accepted" transactionid="505eeb9c43969d4919c0a6b3f7a4dfbb" messageid="a92eff8d65cf48e9c6e96702a7b07400"/> 
</rsp>';

if (strpos($xml, 'stat="ok"') !== false) {
    echo "sent";
} else {
    echo "unsent";
}

?>


Output:
1
sent


Create a new paste based on this one


Comments: