Location: PHPKode > projects > MySpace > myspace/sample.php
<?php
/* Created by kambodianboi */
/*   MySpace Basic Class   */

include("myspace.class.php");

$friend_id = "9362007";
$myspace = new myspace_profile("http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=".$friend_id);

$tmp = explode("<u:break>", $myspace->get_comments());

for($i=1;$i<10;$i++)
{
        $text[] = $myspace->strip($tmp[$i], "<u:name>", "</u:name>") ." - ".$myspace->strip($tmp[$i], "<c:date>", "</c:date>");
        $str[$i] = explode("\n", wordwrap(strip_tags($myspace->strip($tmp[$i], "<c:comment>", "</c:comment>")),80,"\n"));

        // Loops (1st = Name/Date : 2nd comments
        for($j=0;$j<count($str[$i]);$j++)
        {
                if(trim($str[$i][$j]) != "")
                {
                        $text[] = trim($str[$i][$j]);
                }
        }
        $text[] = "!break!"; // Splitter, End of their comment
}
echo "Total Friends: ";
echo $myspace->get_friends();

echo "<br/>Comments";
echo "<pre>";
print_r($text);
echo "</pre>";
?>
Return current item: MySpace