Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. <?PHP // stored as, e.g., "myMibbit.php"; this is just an example!
  2. // Please DON'T use this code if you don't fully understand it!
  3. session_start(); // and similar stuff
  4. $nick = empty($_SESSION['user_name']) ? 'Wdg' : $_SESSION['user_name'];
  5. $server = "irc.synirc.net"; // default: irc.mibbit.net
  6. $room = "MibChat"; // w/o # or %23 !
  7. //(^- above vars only for this example)
  8. $uri = "https://widget.mibbit.com/" .
  9. "?nick=$nick_%3F%3F" . // each %3F(=?) will be replaced by a random digit
  10. "&customprompt=Welcome%20to%20$server/$room" .
  11. "&customloading=maybe%20you%20need%20to%20close%20other%20Mibbit%20windows%20first..." .
  12. "&settings=c76462e5055bace06e32d325963b39f2"; // etc.
  13. if (!empty($room)) {$uri .= '&channel=%23' . $room;}
  14. if (!empty($server )) {$uri .= '&server=' . $server;}
  15. // IE needs a proper header:
  16. ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  17. <html><head><title>my chat on
  18. <?php echo empty($server) ? 'irc.mibbit.net' : $server; ?></title>
  19. <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
  20. <style>
  21. body {font:93% verdana,sans-serif; background:#999; color:#fff;}
  22. iframe {
  23. width: 97%;
  24. height: 400px /* "%" doesn't work for height in strict mode! */;
  25. }
  26. </style>
  27. </head>
  28. <body><center>
  29. <h3>advanced embedded mibbit widget example</h3>
  30. <iframe src="<?PHP echo $uri; ?>" frameborder="0">
  31. [Your user agent does not support frames or is currently configured
  32. not to display frames. However, you may want to open the
  33. <A href="<?PHP echo $uri; ?>"
  34. target="_blank"> chat in a new browser window ...</A>]
  35. </iframe>
  36. <br>(no spaces, interpunctuation or leading ciphers in your /nick name)
  37. <h4>type /help to learn about special commands</h4>
  38. </center></body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement