• Home
  • Servers
  • Chat
  • Channels
  • Commands
  • Forum
  • FAQ
  • Software
  • Quotes
Topic Options
Rate This Topic
#4858 - 05/03/09 09:47 AM iGoogle/ning chat widget
Duffy Offline
n00b

Registered: 03/18/08
Posts: 5
Loc: 127.0.0.1
I was wondering if it would be possible for you guys to host a .php file that would allow users to easily embed the flash chat into iGoogle and ning as a widget. with this users would be able to embed there chat into ning using the add application by url and use http://domain.com/chatwidget.php?channel=there-channel as the url

Quote:
<?php
header("Content-Type: application/xml");
$channel = $_GET['channel'];
echo '<Module> <ModulePrefs title="Chat" height="500" width="480" /> <Content type="html"><![CDATA[';

echo '<div style="text-align: center;"><embed width="480" height="480" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" src="http://flashirc.WyldRyde.org/wr.php?uip=1&joinonconnect='. $channel .'&fsize=0&chatonly=0&restricted=0&key=&nick=Webuser-'. rand(1, 20000) .'&headercolor=2180d0&bgcolor=000" allowfullscreen="true" /></embed><br /><a href="http://www.WyldRyde.org/" target="_blank"><img src="http://www.WyldRyde.org/chat/poweredbywyldryde.gif" width="129" height="18" border="0" alt="Powered by WyldRyde IRC Network. Add a free web chat to your web site."></a></div>';

echo ' ]]></Content></Module>';

?>


example of what chatwidget.php?channel=somewhere would output
Quote:
<Module> <ModulePrefs title="Chat" height="500" width="480" /> <Content type="html"><![CDATA[<div style="text-align: center;"><embed width="480" height="480" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" src="http://flashirc.wyldryde.org/wr.php?uip=1&joinonconnect=somewhere&fsize=0&chatonly=0&restricted=0&key=&nick=Webuser-12073&headercolor=2180d0&bgcolor=000" allowfullscreen="true" /></embed><br /><a href="http://www.wyldryde.org/" target="_blank"><img src="http://www.wyldryde.org/chat/poweredbywyldryde.gif" width="129" height="18" border="0" alt="Powered by WyldRyde IRC Network. Add a free web chat to your web site."></a></div> ]]></Content></Module>

Top
Sponsored Links
Sponsored Links
Member
*****

Registered: 27/08/04
Posts: 10136
Loc: Mountain View, CA
Top
#4865 - 05/05/09 04:19 PM Re: iGoogle/ning chat widget [Re: Duffy]
Phil Offline
Over 200 posts

Registered: 10/23/06
Posts: 205
Loc: Warwick, UK
That code is subjectable to XSS. You need to run the channel through htmlentities() before outputting it directly to the page.

Php Code:

<?php
header("Content-Type: application/xml");
$channel = htmlentities($_GET['channel']);

echo '<Module> <ModulePrefs title="Chat" height="500" width="480" /> <Content type="html"><![CDATA[';

echo '<div style="text-align: center;"><embed width="480" height="480" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" src="http://flashirc.wyldryde.org/wr.php?uip=1&joinonconnect='. $channel .'&fsize=0&chatonly=0&restricted=0&key=&nick=Webuser-'. rand(1, 20000) .'&headercolor=2180d0&bgcolor=000" allowfullscreen="true" /></embed><br /><a href="http://www.wyldryde.org/" target="_blank"><img src="http://www.wyldryde.org/chat/poweredbywyldryde.gif" width="129" height="18" border="0" alt="Powered by WyldRyde IRC Network. Add a free web chat to your web site."></a></div>';

echo ' ]]></Content></Module>';

?>



Edited by Phil (05/05/09 04:19 PM)

Top
#4893 - 05/09/09 02:13 PM Re: iGoogle/ning chat widget [Re: Phil]
usrbingeek Offline

WyldRyde Staff

Registered: 07/31/06
Posts: 646
Loc: Burlington, VT
Sorry for the delay.

I placed the file at http://www.wyldryde.org/chat/ig.php?channel=help
_________________________
WyldRyde IRC Network
Steve Mermelstein
Root Admin

#!/usr/bin/geek
My Amazon.com Wishlist

Please no PMs. Please post to a topic instead so your question(s) may benefit others.

Top


Moderator:  Jeff, mandy, usrbingeek