Created
May 20, 2012 02:53
-
-
Save sergej-brazdeikis/2736766 to your computer and use it in GitHub Desktop.
vk.com video play
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * Returns iframe code to play video | |
| * Note: some videos are unable to embed because of particular video settings | |
| */ | |
| public function play($id1, $id2) | |
| { | |
| // getting hash | |
| $hash = $this->gb->getPregOne('http://vk.com/video'.$id1.'_'.$id2, "/hash2[^0-9a-f]*([0-9a-f]*)/"); | |
| $link = 'http://vk.com/video_ext.php?oid='.$id1.'&id='.$id2.'&hash='.$hash.'&hd=1'; | |
| return $link; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment