Guest User

ZippyShare Function

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