Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function get_url_contents($url){
- $crl = curl_init();
- $timeout = 5;
- curl_setopt ($crl, CURLOPT_URL,$url);
- curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
- curl_setopt ($crl, CURLOPT_SSL_VERIFYPEER, false);
- $ret = curl_exec($crl);
- curl_close($crl);
- return $ret;
- }
- function video($stream, $videoheight, $width){
- echo"<object type='application/x-shockwave-flash' height='$videoheight' width='$width' id='live_embed_player_flash' data='http://www.twitch.tv/widgets/live_embed_player.swf?channel=$stream' bgcolor='#000000'>
- <param name='allowFullScreen' value='true' />
- <param name='allowScriptAccess' value='always' />
- <param name='allowNetworking' value='all' />
- <param name='movie' value='http://www.twitch.tv/widgets/live_embed_player.swf' />
- <param name='flashvars' value='hostname=www.twitch.tv&channel=$stream&auto_play=true&start_volume=25' /></object>";
- }
- function chat($name, $chatheight, $width){
- echo"<td><center>
- <iframe frameborder='0' scrolling='no' id='chat_embed' src='http://twitch.tv/chat/embed?channel=$name&popout_chat=true' height='$chatheight' width='$width'></iframe>
- </center></td>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement