Tip: Click lines to highlight, hold ctrl/cmd to multi-select

Fresherplay Soundcloud Authentication (import.php) (13-Jan @ 18:43)

desbest.myopenid.com

Syntax Highlighted Code

  1. <?php
  2. require_once 'oauth.php';
  3. require_once 'soundcloud.php';
  4.  
  5.  
  6. // Clear the session i.e delete all stored tokens.
  7. if (isset($_GET['logout'])) {
  8. }
  9.  
  10. // Change these four variables, note the that temporary path must be writable by the server.
  11. $consumer_key = '6Sg4X3oTeaq5U6qJGJehw';
  12. $consumer_secret = '6JBq9Qz2UHBMfSWS26tYx7jP6YUlW6DZqQxSMXENc2c';
  13. $callback_url = 'http://fresherplay.tk/';
  14. $tmp_path = 'temp/';
  15.  
  16. // Variables used for verifying the status of the "OAuth dance".
  17. $oauth_token = (isset($_GET['oauth_verifier']))
  18.     ? $_GET['oauth_verifier']
  19.     : ((isset($_SESSION['oauth_access_token'])) ? $_SESSION['oauth_access_token'] : NULL);
  20. $oauth_request_token = (isset($_SESSION['oauth_request_token']))
  21.     ? $_SESSION['oauth_request_token']
  22.     : NULL;
  23. $oauth_request_token_secret = (isset($_SESSION['oauth_request_token_secret']))
  24.     ? $_SESSION['oauth_request_token_secret']
  25.     : NULL;
  26.  
  27. if (isset($oauth_token) && isset($oauth_request_token) && isset($oauth_request_token_secret)) {
  28.     // Retreive access tokens if missing.
  29.     if (!isset($_SESSION['oauth_access_token']) && !isset($_SESSION['oauth_access_token_secret'])) {
  30.         $soundcloud = new Soundcloud(
  31.             $consumer_key,
  32.             $consumer_secret,
  33.             $_SESSION['oauth_request_token'],
  34.             $_SESSION['oauth_request_token_secret']
  35.         );
  36.         $token = $soundcloud->get_access_token($oauth_token);
  37.         $_SESSION['oauth_access_token'] = $token['oauth_token'];
  38.         $_SESSION['oauth_access_token_secret'] = $token['oauth_token_secret'];
  39.     }
  40.  
  41.     // Construct a fully authicated connection with SoundCloud.
  42.     $soundcloud = new Soundcloud(
  43.         $consumer_key,
  44.         $consumer_secret,
  45.         $_SESSION['oauth_access_token'],
  46.         $_SESSION['oauth_access_token_secret']
  47.     );
  48.  
  49.     // Get basic info about the authicated visitor.
  50.     $me = $soundcloud->request('me');
  51.     $me = new SimpleXMLElement($me);
  52.     $me = get_object_vars($me);
  53.     $mytracks = $soundcloud->request('me/tracks/');
  54.     $mytracks = new SimpleXMLElement($mytracks);
  55.     $mytracks = get_object_vars($mytracks);
  56.     $x1 = $soundcloud->request('me/tracks/');
  57.     $x1 = new SimpleXMLElement($x1);
  58.     $x2 = $soundcloud->request('me/tracks/');
  59.     $x2 = new SimpleXMLElement($x2);
  60.  
  61.     // If a track is submitted.
  62.     if (isset($_POST['submit'])) {
  63.         // We have to make sure it's a valid and supported format by SoundCloud.
  64.         // Note that you also can include artwork for your tracks. Use the same
  65.         // procedure as for the tracks. PNG, JPG, GIF allowed and a max size of 5MB.
  66.         // The artwork field is called track[artwork_data].
  67.         $mimes = array(
  68.             'aac' => 'video/mp4',
  69.             'aiff' => 'audio/x-aiff',
  70.             'flac' => 'audio/flac',
  71.             'mp3' => 'audio/mpeg',
  72.             'ogg' => 'audio/ogg',
  73.             'wav' => 'audio/x-wav'
  74.         );
  75.         $extension = explode('.', $_FILES['file']['name']);
  76.         $extension = (isset($extension[count($extension) - 1]))
  77.             ? $extension[count($extension) - 1]
  78.             : NULL;
  79.         $mime = (isset($mimes[$extension])) ? $mimes[$extension] : NULL;
  80.  
  81.         if (isset($mime)) {
  82.             $tmp_file = $tmp_path . $_FILES['file']['name'];
  83.  
  84.             // Store the track temporary.
  85.             if (move_uploaded_file($_FILES['file']['tmp_name'], $tmp_file)) {
  86.                 $post_data = array(
  87.                     'track[title]' => stripslashes($_POST['title']),
  88.                     'track[asset_data]' => realpath($tmp_file),
  89.                     'track[sharing]' => 'private'
  90.                 );
  91.  
  92.                 if ($response = $soundcloud->upload_track($post_data, $mime)) {
  93.                     $response = new SimpleXMLElement($response);
  94.                     $response = get_object_vars($response);
  95.                     $message = 'Success! <a href="' . $response['permalink-url'] . '">Your track</a> has been uploaded!';
  96.  
  97.                     // Delete the temporary file.
  98.                     unlink(realpath($tmp_file));
  99.                 } else {
  100.                     $message = 'Something went wrong while talking to SoundCloud, please try again.';
  101.                 }
  102.             } else {
  103.                 $message = 'Couldn\'t move file, make sure the temporary path is writable by the server.';
  104.             }
  105.         } else {
  106.             $message = 'SoundCloud support .mp3, .aiff, .wav, .flac, .aac, and .ogg files. Please select a different file.';
  107.         }
  108.     }
  109. } else {
  110.     // This is the first step in the "OAuth dance" where we ask the visitior to authicate himself.
  111.     $soundcloud = new Soundcloud($consumer_key, $consumer_secret);
  112.     $token = $soundcloud->get_request_token($callback_url)
  113.        or die ("    <h1>Could not connect to soundcloud via the api</h1>    <br>Email fresherplay about this error     <br>Use the back button to go back")
  114.        ;
  115.  
  116.     $_SESSION['oauth_request_token'] = $token['oauth_token'];
  117.     $_SESSION['oauth_request_token_secret'] = $token['oauth_token_secret'];
  118.  
  119.     $login = $soundcloud->get_authorize_url($token['oauth_token']);
  120. }
  121. ?>
  122.  
  123. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  124.   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  125.  
  126. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  127. <head>
  128. <title>Fresherplay</title>
  129.  
  130. <script type="text/javascript" src="jquery.js"></script>
  131. <script type="text/javascript" src="ui-core.js"></script>
  132. <script type="text/javascript" src="flash.js"></script>
  133. <script type="text/javascript" src="localscroll.js"></script>
  134. <script type="text/javascript" src="hide.js"></script>
  135. <script type='text/javascript' src='swfobject.js'></script>
  136.  
  137. <SCRIPT LANGUAGE="JavaScript">
  138. <!-- Idea by:  Nic Wolfe -->
  139. <!-- This script and many more are available free online at -->
  140. <!-- The JavaScript Source!! http://javascript.internet.com -->
  141.  
  142. <!-- Begin
  143. function popUp(URL) {
  144. day = new Date();
  145. id = day.getTime();
  146. eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=528,height=158');");
  147. }
  148. // End -->
  149. </script>
  150.  
  151.  
  152. <script type="text/javascript">
  153.  
  154. // Array variable to hold a list of all player IDs on the page
  155. var mediaPlayer = ['s1', 's2', 's3', 's4'];
  156.  
  157. // Add a listener to trigger function stopOtherPlayers whenever an item is played
  158. function playerReady(obj) {
  159. document.getElementById(obj.id).addControllerListener('ITEM', 'stopOtherPlayers');
  160. }
  161.  
  162. // Loop through all player IDs and, unless the player ID is the currently selected player ID, tell them to stop
  163. function stopOtherPlayers(obj) {
  164. for ( var id in mediaPlayer ) {
  165. if ( obj.id != mediaPlayer[id] ) document.getElementById(mediaPlayer[id]).sendEvent('STOP');
  166. }
  167. }
  168. </script>
  169.  
  170. <link rel="stylesheet"  type="text/css" href="stylesheet.css">
  171. </head>
  172. <body>
  173. <div class="headerpane" id="thetop">
  174. <img src="header.png" align="left" style="z-index: 3">
  175.  
  176.  
  177.  
  178. </div>
  179.  
  180. <div class="leftpane">    
  181.  
  182. <div class="menuhere"><div id="navcontainer">
  183.     <ul id="navlist">
  184.     <li id="active"><a>Import Music</a></li>
  185.     <!-- <li id="sel4"><a>Email Fresherplay</a></li> -->
  186.  
  187.     </ul>
  188.     </div>
  189. </div></div>
  190.  
  191.  
  192.    
  193. </div>
  194. <div class="rightpane">  
  195.  
  196. <div class="content5" id="thechart">    
  197.  
  198. <div id="rev1">    
  199.     <font class="headline">Import Music from Soundcloud</font>
  200.         <?php if (isset($login)): ?>
  201.             <a class="button" href="<?php echo $login; ?>"><img src="sc-connect.png"></a>
  202.         <?php elseif (isset($me)): ?>
  203.                         <img src="<?php echo $me['avatar-url']; ?>" width="75" height="75" alt="" align="left"/>
  204.                         <a href="<?php echo $me['permalink-url']; ?>"><?php echo $me['permalink']; ?></a>
  205.                     <br><?php echo $me['full-name'] ?>, <?php echo $me['city']; ?>, <?php echo $me['country']; ?></p>
  206.                     <br>
  207.                     <?php if (isset($me)): ?>
  208.                     <br><a class="logout" href="?logout=true">logout from soundcloud</a><br>
  209.                     <?php endif; ?>
  210.                     <br>You have <?php echo $me['track-count']; ?> <?php echo ($me['track-count'] == 1) ? 'track' : 'tracks'; ?>.</p>
  211. <br>
  212. <?php
  213.     echo "<table cellspacing=\"5\" cellpadding=\"5\">";    
  214. foreach($x2 as $user){
  215. echo "<tr><td>";
  216. if (!isset($numbera)) {$number = "0";}
  217. $numbera = $numbera +1;
  218.  
  219.     echo '<img src="arrow.png" align="left">'.$user->title.'
  220.    <!-- Address: '.$user->address.' -->
  221.    <br />
  222.    ';
  223. $stream2 = $user->xpath('stream-url');
  224. $perma2 = $user->xpath('permalink');
  225. //print_r($perma2);
  226. //echo "<b> $perma2[0] </b>";
  227. $stream3 = $stream2[0];
  228. $perma3 = $perma2[0];
  229. $stream4 = urlencode($stream3);
  230. $perma4 = urlencode($perma3);
  231. <div id=\"YouTubeReloadedPlayer$numbera\">
  232. To play music on this website you need the Adobe Flash Plugin.
  233. <br><a href=\"http://www.adobe.com/go/EN_US-H-GET-FLASH\"><img src=\"getflash.png\"></a>
  234. </div>
  235.  
  236. <script type='text/javascript'>
  237.  var so = new SWFObject('player2/player.swf','mpl','470','55','9');
  238.  so.addParam('allowfullscreen','true');
  239.  so.addParam('allowscriptaccess','always');
  240.  so.addParam('wmode','opaque');
  241.  so.addVariable('file','$stream3');
  242.  so.addVariable('provider','sound');
  243.  so.write('YouTubeReloadedPlayer$numbera');
  244. </script>
  245. ";
  246. </td>
  247. <td>
  248. <img src=\"upload.png\" height=\"60\" width=\"60\">
  249. <br><font size=\"-2\"><a href=\"import2.php?url=$stream4&permalink=$perma4\">Add to Fresherplay</a></font>
  250. </td>
  251. </tr>
  252. ";
  253.  
  254. } echo "</table>";
  255. //print_r($x2->tracks->track);
  256. //print $x2->tracks->track->permalink-XXurl . "\n";
  257.  
  258. /*
  259.         foreach($x1->story as $story) {
  260.     print("<h2>" . $story->headline . "</h2><br />");
  261.     print($story->description . "<br />_________________________<br />");
  262.     print($story->headline["date"] . "<br /><br />");
  263.    
  264. }
  265.    
  266.     */    
  267. //print_r($x1);
  268. //echo "<hr size=\"30\" color=\"#6633ff\">";
  269.  
  270.  
  271.  
  272. //echo $x1->getName() . "<br />";
  273. //echo "<hr size=\"30\" color=\"#336633\">";
  274. foreach($x1->children() as $child)
  275. {
  276.  
  277. //print_r($child);
  278. //echo $child->getName() . ": " . $child . "<br />";
  279. //echo "$child[title]";
  280. foreach($child->children() as $childx)
  281. {
  282. //echo ("$childx[0]" );
  283. /*
  284. */
  285. //echo $childx->getName() . ": " . $childx . "<br />";
  286.  
  287. }
  288. print($child[tracks][track]);
  289. //echo $child->getName() . ": " . $child . "<br />";
  290. //echo "<hr size=\"30\" bgcolor=\"#cc0000\" color=\"#cc0000\">";
  291. }
  292.  
  293.  
  294.  
  295.           //$myvar = $mytracks->[track]->uri;
  296.         //print_r($);
  297.         ?>                <!-- <h2>Upload a new track</h2>
  298.                 <form action="" method="post" enctype="multipart/form-data">
  299.                     <p>
  300.                         <label for="title">Track title</label>
  301.                         <input class="text" type="text" name="title" id="title" />
  302.                     </p>
  303.                     <p>
  304.                         <label for="file">File</label>
  305.                         <input class="file" type="file" name="file" value="" id="file" />
  306.                     </p>
  307.                     <p class="center">
  308.                         <input class="submit" type="submit" name="submit" value="Upload" id="submit" />
  309.                     </p>
  310.                 </form>
  311.                 -->
  312.                 <?php if (isset($message)): ?>
  313.                     <div id="message">
  314.                         <p><?php echo $message; ?></p>
  315.                     </div>
  316.                 <?php endif; ?>
  317.             <?php endif; ?>
  318.         </div>
  319.     </div>
  320. </div>
  321.    
  322.  
  323.    
  324. </div>    <!-- CLOSE content5 -->
  325.  
  326.  
  327. </div> <!-- CLOSE rightside -->
  328.  
  329.  
  330. <script type="text/javascript" src="//counter.goingup.com/js/tracker.js?st=bc4gyw7&amp;b=5"></script>
  331. <noscript><a href="http://www.goingup.com" title=""><img src="//counter.goingup.com/default.php?st=bc4gyw7&amp;b=5" border="0" /></a></noscript>
  332.  
  333.  
  334.  
  335. </body>
  336. </html>

Plain Code

<?php
error_reporting(E_ALL);
require_once 'oauth.php';
require_once 'soundcloud.php';

session_start();

// Clear the session i.e delete all stored tokens.
if (isset($_GET['logout'])) {
    session_destroy();
}

// Change these four variables, note the that temporary path must be writable by the server.
$consumer_key = '6Sg4X3oTeaq5U6qJGJehw';
$consumer_secret = '6JBq9Qz2UHBMfSWS26tYx7jP6YUlW6DZqQxSMXENc2c';
$callback_url = 'http://fresherplay.tk/';
$tmp_path = 'temp/';

// Variables used for verifying the status of the "OAuth dance".
$oauth_token = (isset($_GET['oauth_verifier']))
    ? $_GET['oauth_verifier']
    : ((isset($_SESSION['oauth_access_token'])) ? $_SESSION['oauth_access_token'] : NULL);
$oauth_request_token = (isset($_SESSION['oauth_request_token']))
    ? $_SESSION['oauth_request_token']
    : NULL;
$oauth_request_token_secret = (isset($_SESSION['oauth_request_token_secret']))
    ? $_SESSION['oauth_request_token_secret']
    : NULL;

if (isset($oauth_token) && isset($oauth_request_token) && isset($oauth_request_token_secret)) {
    // Retreive access tokens if missing.
    if (!isset($_SESSION['oauth_access_token']) && !isset($_SESSION['oauth_access_token_secret'])) {
        $soundcloud = new Soundcloud(
            $consumer_key,
            $consumer_secret,
            $_SESSION['oauth_request_token'],
            $_SESSION['oauth_request_token_secret']
        );
        $token = $soundcloud->get_access_token($oauth_token);
        $_SESSION['oauth_access_token'] = $token['oauth_token'];
        $_SESSION['oauth_access_token_secret'] = $token['oauth_token_secret'];
    }

    // Construct a fully authicated connection with SoundCloud.
    $soundcloud = new Soundcloud(
        $consumer_key,
        $consumer_secret,
        $_SESSION['oauth_access_token'],
        $_SESSION['oauth_access_token_secret']
    );

    // Get basic info about the authicated visitor.
    $me = $soundcloud->request('me');
    $me = new SimpleXMLElement($me);
    $me = get_object_vars($me);
    $mytracks = $soundcloud->request('me/tracks/');
    $mytracks = new SimpleXMLElement($mytracks);
    $mytracks = get_object_vars($mytracks);
    $x1 = $soundcloud->request('me/tracks/');
    $x1 = new SimpleXMLElement($x1);
    $x2 = $soundcloud->request('me/tracks/');
    $x2 = new SimpleXMLElement($x2);

    // If a track is submitted.
    if (isset($_POST['submit'])) {
        // We have to make sure it's a valid and supported format by SoundCloud.
        // Note that you also can include artwork for your tracks. Use the same
        // procedure as for the tracks. PNG, JPG, GIF allowed and a max size of 5MB.
        // The artwork field is called track[artwork_data].
        $mimes = array(
            'aac' => 'video/mp4',
            'aiff' => 'audio/x-aiff',
            'flac' => 'audio/flac',
            'mp3' => 'audio/mpeg',
            'ogg' => 'audio/ogg',
            'wav' => 'audio/x-wav'
        );
        $extension = explode('.', $_FILES['file']['name']);
        $extension = (isset($extension[count($extension) - 1]))
            ? $extension[count($extension) - 1]
            : NULL;
        $mime = (isset($mimes[$extension])) ? $mimes[$extension] : NULL;

        if (isset($mime)) {
            $tmp_file = $tmp_path . $_FILES['file']['name'];

            // Store the track temporary.
            if (move_uploaded_file($_FILES['file']['tmp_name'], $tmp_file)) {
                $post_data = array(
                    'track[title]' => stripslashes($_POST['title']),
                    'track[asset_data]' => realpath($tmp_file),
                    'track[sharing]' => 'private'
                );

                if ($response = $soundcloud->upload_track($post_data, $mime)) {
                    $response = new SimpleXMLElement($response);
                    $response = get_object_vars($response);
                    $message = 'Success! <a href="' . $response['permalink-url'] . '">Your track</a> has been uploaded!';

                    // Delete the temporary file.
                    unlink(realpath($tmp_file));
                } else {
                    $message = 'Something went wrong while talking to SoundCloud, please try again.';
                }
            } else {
                $message = 'Couldn\'t move file, make sure the temporary path is writable by the server.';
            }
        } else {
            $message = 'SoundCloud support .mp3, .aiff, .wav, .flac, .aac, and .ogg files. Please select a different file.';
        }
    }
} else {
    // This is the first step in the "OAuth dance" where we ask the visitior to authicate himself.
    $soundcloud = new Soundcloud($consumer_key, $consumer_secret);
    $token = $soundcloud->get_request_token($callback_url) 
       or die ("    <h1>Could not connect to soundcloud via the api</h1>    <br>Email fresherplay about this error     <br>Use the back button to go back")
       ;

    $_SESSION['oauth_request_token'] = $token['oauth_token'];
    $_SESSION['oauth_request_token_secret'] = $token['oauth_token_secret'];

    $login = $soundcloud->get_authorize_url($token['oauth_token']);
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Fresherplay</title>

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="ui-core.js"></script>
<script type="text/javascript" src="flash.js"></script>
<script type="text/javascript" src="localscroll.js"></script>
<script type="text/javascript" src="hide.js"></script>
<script type='text/javascript' src='swfobject.js'></script>

<SCRIPT LANGUAGE="JavaScript">
<!-- Idea by:  Nic Wolfe -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=528,height=158');");
}
// End -->
</script>


<script type="text/javascript">

// Array variable to hold a list of all player IDs on the page
var mediaPlayer = ['s1', 's2', 's3', 's4'];

// Add a listener to trigger function stopOtherPlayers whenever an item is played
function playerReady(obj) {
document.getElementById(obj.id).addControllerListener('ITEM', 'stopOtherPlayers');
}

// Loop through all player IDs and, unless the player ID is the currently selected player ID, tell them to stop
function stopOtherPlayers(obj) {
for ( var id in mediaPlayer ) {
if ( obj.id != mediaPlayer[id] ) document.getElementById(mediaPlayer[id]).sendEvent('STOP');
}
}
</script>

<link rel="stylesheet"  type="text/css" href="stylesheet.css">
</head>
<body>
<div class="headerpane" id="thetop">
<img src="header.png" align="left" style="z-index: 3"> 



</div>

<div class="leftpane">    

<div class="menuhere"><div id="navcontainer">
    <ul id="navlist">
    <li id="active"><a>Import Music</a></li>
    <!-- <li id="sel4"><a>Email Fresherplay</a></li> -->

    </ul>
    </div>
</div></div>


    
</div>
<div class="rightpane">  

<div class="content5" id="thechart">    

<div id="rev1">    
    <font class="headline">Import Music from Soundcloud</font>
        <?php if (isset($login)): ?>
            <a class="button" href="<?php echo $login; ?>"><img src="sc-connect.png"></a>
        <?php elseif (isset($me)): ?>
                        <img src="<?php echo $me['avatar-url']; ?>" width="75" height="75" alt="" align="left"/>
                        <a href="<?php echo $me['permalink-url']; ?>"><?php echo $me['permalink']; ?></a>
                    <br><?php echo $me['full-name'] ?>, <?php echo $me['city']; ?>, <?php echo $me['country']; ?></p>
                    <br>
                    <?php if (isset($me)): ?>
                    <br><a class="logout" href="?logout=true">logout from soundcloud</a><br> 
                    <?php endif; ?>
                    <br>You have <?php echo $me['track-count']; ?> <?php echo ($me['track-count'] == 1) ? 'track' : 'tracks'; ?>.</p>
<br>
<?php
    echo "<table cellspacing=\"5\" cellpadding=\"5\">";    
foreach($x2 as $user){
echo "<tr><td>";
if (!isset($numbera)) {$number = "0";}
$numbera = $numbera +1;

    echo '<img src="arrow.png" align="left">'.$user->title.' 
    <!-- Address: '.$user->address.' -->
    <br />
    ';
$stream2 = $user->xpath('stream-url');
$perma2 = $user->xpath('permalink');
//print_r($perma2);
//echo "<b> $perma2[0] </b>";
$stream3 = $stream2[0];
$perma3 = $perma2[0];
$stream4 = urlencode($stream3);
$perma4 = urlencode($perma3);
echo "
<div id=\"YouTubeReloadedPlayer$numbera\">
To play music on this website you need the Adobe Flash Plugin.
<br><a href=\"http://www.adobe.com/go/EN_US-H-GET-FLASH\"><img src=\"getflash.png\"></a>
</div>

<script type='text/javascript'>
  var so = new SWFObject('player2/player.swf','mpl','470','55','9');
  so.addParam('allowfullscreen','true');
  so.addParam('allowscriptaccess','always');
  so.addParam('wmode','opaque');
  so.addVariable('file','$stream3');
  so.addVariable('provider','sound');
  so.write('YouTubeReloadedPlayer$numbera');
</script>
";
echo "
</td>
<td>
<img src=\"upload.png\" height=\"60\" width=\"60\">
<br><font size=\"-2\"><a href=\"import2.php?url=$stream4&permalink=$perma4\">Add to Fresherplay</a></font>
</td>
</tr>
";

} echo "</table>";
//print_r($x2->tracks->track);
//print $x2->tracks->track->permalink-XXurl . "\n";

/*
        foreach($x1->story as $story) {
    print("<h2>" . $story->headline . "</h2><br />");
    print($story->description . "<br />_________________________<br />");
    print($story->headline["date"] . "<br /><br />");
    
}
    
    */    
//print_r($x1);
//echo "<hr size=\"30\" color=\"#6633ff\">";



//echo $x1->getName() . "<br />";
//echo "<hr size=\"30\" color=\"#336633\">";
foreach($x1->children() as $child)
{

//print_r($child);
//echo $child->getName() . ": " . $child . "<br />";
//echo "$child[title]";
foreach($child->children() as $childx)
{
//echo ("$childx[0]" );
/*
*/
//echo $childx->getName() . ": " . $childx . "<br />";

}
print($child[tracks][track]);
//echo $child->getName() . ": " . $child . "<br />";
//echo "<hr size=\"30\" bgcolor=\"#cc0000\" color=\"#cc0000\">";
}
  
  
  
          //$myvar = $mytracks->[track]->uri;
        //print_r($);
        ?>                <!-- <h2>Upload a new track</h2>
                <form action="" method="post" enctype="multipart/form-data">
                    <p>
                        <label for="title">Track title</label>
                        <input class="text" type="text" name="title" id="title" />
                    </p>
                    <p>
                        <label for="file">File</label>
                        <input class="file" type="file" name="file" value="" id="file" />
                    </p>
                    <p class="center">
                        <input class="submit" type="submit" name="submit" value="Upload" id="submit" />
                    </p>
                </form>
                -->
                <?php if (isset($message)): ?>
                    <div id="message">
                        <p><?php echo $message; ?></p>
                    </div>
                <?php endif; ?>
            <?php endif; ?>
        </div>
    </div>
</div>
    

    
</div>    <!-- CLOSE content5 -->


</div> <!-- CLOSE rightside -->


<script type="text/javascript" src="//counter.goingup.com/js/tracker.js?st=bc4gyw7&amp;b=5"></script>
<noscript><a href="http://www.goingup.com" title=""><img src="//counter.goingup.com/default.php?st=bc4gyw7&amp;b=5" border="0" /></a></noscript>



</body>
</html>

Permalink: http://codedumper.com/adeqi