Yes, me again.
I just downloaded and installed Status2FTP, and I immediatly fell in love with it.
It does what it has to do, and now I want to use it in my signature, as replacement for Web2Messenger.
This means that I have to replace this:
code:
<Details>
<Username>[c=1]<simply[b]_me>[/b][/c=12]</Username>
<PSM><:o) Messenger Plus! [c=7]Live[/c] is arrived! <:o)</PSM>
<Status>Online</Status>
</Details>
into this:
code:
$nick = "[c=1]<simply[b]_me>[/b][/c=12]";
$psm = "<:o) Messenger Plus! [c=7]Live[/c] is arrived! <:o)";
$status = "Online";
So far, I managed to create a function called
getXMLData($i) to return the value for $nick, $psm and $status:
code:
function getXMLData($i) {
global $content2;
$data = str_replace(array("<Details>","</Details>"), "", $content2);
$data0 = preg_replace("/<Username>(.*?)<\/Username>/","\\1", $data);
$data1 = preg_replace("/<PSM>(.*?)<\/PSM>/","\\1", $data);
$data2 = preg_replace("/<Status>(.*?)<\/Status>/","\\1", $data);
eval("return \$data$i;");
}
$content2 is the variable containing the XML file, but unfortunaly it doesn't works like I wanted. As you can see, it only drops the <Username> and </Username> tags, where it has to drop these tags and everything before and behind it. And with my small knowledge of regular expressions, I'm back to ask the Messenger Plus!
Live community.
Any replies or questions are more than welcome!