Hello--
I have a class which gets data and outputs it. I'm trying to change the data that it outputs however I'm having some trouble. I've never used classes before so I think that that may be a reason why the following code doesn't work.
if ($data = @fgets($this->fp, 4096))
{
If(strpos($data, 'machineguid></data>') > 0){
$bilgi = explode('machineguid></data>', $data);
print "bulduuu";
if ($this->debug) echo "<div class=\"r\"><<< SB: $bilgi[0]</div>\n";
return $bilgi[0];
If(strlen($bilgi[1]) > 0){
if ($this->debug) echo "<div class=\"r\"><<< SB: $bilgi[1]</div>\n";
return $bilgi[1];
}
}else{
//print $data;
if ($this->debug) echo "<div class=\"r\"><<< SB: $data</div>\n";
return $data; }
}
That outputs:
<div class="r"><<< <data><psm></psm><currentmedia>WMP\0Music\00\0{0} - {1}\0\0\0\0\0</currentmedia><machineguid>{419A56EA-C65D-48EA-8295-DAECF9DECEF1}</machineguid></data>UBX bleh@gmail.com 118
</div>
While it should output:
<div class="r"><<< <data><psm></psm><currentmedia>WMP\0Music\00\0{0} - {1}\0\0\0\0\0</currentmedia><machineguid>{419A56EA-C65D-48EA-8295-DAECF9DECEF1}</machineguid></data></div>
<div class="r"><<< UBX bleh@gmail.com 118</div>
In other words it should output anything that comes after </machineguid></data> as another string. Using </ < characters as strings is sometimes troublesome so I thought Id see if the code would find "machineguid" but it couldn't do that either, so I have no idea where the problem is...
Thanks for the help!