Advertisement
nickmcski

Untitled

May 18th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. <?php
  2.  
  3. function get_url_contents($url){
  4. $crl = curl_init();
  5. $timeout = 5;
  6. curl_setopt ($crl, CURLOPT_URL,$url);
  7. curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
  8. curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
  9. curl_setopt ($crl, CURLOPT_SSL_VERIFYPEER, false);
  10. $ret = curl_exec($crl);
  11. curl_close($crl);
  12. return $ret;
  13. }
  14.  
  15. function video($stream, $videoheight, $width){
  16. 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'>
  17. <param name='allowFullScreen' value='true' />
  18. <param name='allowScriptAccess' value='always' />
  19. <param name='allowNetworking' value='all' />
  20. <param name='movie' value='http://www.twitch.tv/widgets/live_embed_player.swf' />
  21. <param name='flashvars' value='hostname=www.twitch.tv&channel=$stream&auto_play=true&start_volume=25' /></object>";
  22. }
  23.  
  24. function chat($name, $chatheight, $width){
  25. echo"<td><center>
  26. <iframe frameborder='0' scrolling='no' id='chat_embed' src='http://twitch.tv/chat/embed?channel=$name&popout_chat=true' height='$chatheight' width='$width'></iframe>
  27. </center></td>";
  28. }
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement