Advertisement
Guest User

ZippyShare Function

a guest
Jun 7th, 2010
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. <?php
  2.  
  3. class ZippyShare {
  4.        
  5.         public function getURL($url) {
  6.            
  7.             $url = str_replace("/file.html", "", explode("/v/", $url));
  8.             $url = $url['0']."/downloadMusic%3Fkey%3D".$url['1']."ay";
  9.             return $url;
  10.         }
  11.  
  12.         public function musicPlayer($url) {
  13.            
  14.             $url = $this->getURL($url);
  15.            
  16.             $player = '<embed
  17.                         width="440"
  18.                         height="20"
  19.                         type="application/x-shockwave-flash"
  20.                         src="http://api.zippyshare.com/api/mediaplayer/mediaplayer.swf"
  21.                         style=""
  22.                         id="mpl"
  23.                         name="mpl"
  24.                         quality="high" allowfullscreen="false"
  25.                         flashvars="height=20&amp;width=440&amp;file='.$url.'&amp;volume=100&amp;autostart=false&amp;frontcolor=0xffffff&amp;backcolor=0x000000&amp;lightcolor=0xffffff&amp;type=flv">
  26.             ';
  27.            
  28.             return $player;
  29.         }
  30.  
  31. }
  32.  
  33. $music = new ZippyShare;
  34. echo $music->musicPlayer('http://www48.zippyshare.com/v/70282946/file.html');
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement