Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > 123 Flash Chat Server Software > 123 Flash Chat Support

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-29-2006, 09:46 PM
Junior Member
 
Join Date: Mar 2006
Posts: 15
Default Struggling with server API

Hey all,
I've been working for hours trying to get this to work and can not figure out whats going on. I'm simply trying to use the server API to add a new room. I have an Apache webserver running flashChat on the same box. I can connect to flash chat fine for chatting. I'll cut and paste the code from here http://www.123flashchat.com/addroom-serverapi.html and it doesn't work. I keep getting this error :

"XML error: no element found at line 1 while parsing entity n"

I have the following in the default.xml

<server-api enable="On">
<auth-password>3874-3459-9293-2194</auth-password>
<allow-access-from-ip>127.0.0.1</allow-access-from-ip>
</server-api>

this is flashchat version 5.1

Can anyone think of anything else I should be checking? or have any idea what might be happening?

thanks.
  #2 (permalink)  
Old 03-30-2006, 03:20 PM
Junior Member
 
Join Date: Mar 2006
Posts: 15
Default Re:Struggling with server API

I'm also still using the DEMO version. could that have anything to do with it?
  #3 (permalink)  
Old 04-05-2006, 06:14 AM
Member
 
Join Date: Jan 2005
Posts: 96
Send a message via MSN to Cloudy
Default Re:Struggling with server API

when you try to use this api,make sure you're running PHP 4.2.0 or greater. This error occurs in PHP 4.1.x.
  #4 (permalink)  
Old 04-05-2006, 12:54 PM
Junior Member
 
Join Date: Mar 2006
Posts: 15
Default Re:Struggling with server API

I've been testing in a php 4.3 and php 5 environment. Still waiting on the official word of whether registration is required in order to use it...
  #5 (permalink)  
Old 04-07-2006, 03:44 AM
joy joy is offline
Senior Member
 
Join Date: Nov 2003
Posts: 361
Default Re:Struggling with server API

here comes the official word:
you don't necessarily need the full version to test server API, demo version is fine too.
  #6 (permalink)  
Old 04-07-2006, 08:15 PM
Junior Member
 
Join Date: Mar 2006
Posts: 15
Default Re:Struggling with server API

Ok... I suppose I'll start pluggin' away at it again then. You may want to let your chat room support know. They told me it had to be registered.
  #7 (permalink)  
Old 04-11-2006, 05:58 AM
Member
 
Join Date: Jan 2005
Posts: 96
Send a message via MSN to Cloudy
Default Re:Struggling with server API

Joy is correct:

you don't necessarily need the full version to test server API, demo version is fine too.

again,please confirm your php version is higher than 4.2.0 or greater,this error occurs in PHP 4.1.x.

if it still can't help you to solve this problem,if possible,you could offer ssh account to us so that we could check what the problem is
  #8 (permalink)  
Old 04-11-2006, 01:44 PM
Junior Member
 
Join Date: Mar 2006
Posts: 15
Default Re:Struggling with server API

Ok, I may try to set something like that up. I have tried this on two different machines, both windows, both Apache. One is PHP 4.3 and the other php 5. I've pretty much just copy and pasted the sample code for add_room and executed that with no success.

I've double checked the auth pass and made sure the server API is on, etc. Feel like I've double checked everything and seems like it should work. I may try to get a ssh server up for you if I can't get this solved in the next week or so. Thanks for the help.
  #9 (permalink)  
Old 04-12-2006, 03:41 PM
Junior Member
 
Join Date: Mar 2006
Posts: 15
Default Re:Struggling with server API

SUCCESS!!!!

Finally got this to work.

Quick summary... I've only simply copied the example code from here

http://www.123flashchat.com/addroom-serverapi.html

Didn't work. I read this little note from the User manual for server api xml strings:

"Note: Remember to terminate XML-commands with a null-byte."

and I assumed thats what this line was doing, from the example code:
fputs($fp,$apiCommand."");

anyhow it wasn't working.. I removed the ."" from the line above, and added a .chr(0) to the end of the xml string like this:

$apiCommand = '<?xml version="1.0" encoding="UTF-8"?><Command group="default" api_pwd="3874-3459-9293-2194" type="add_room" name="test room" owner="admin" desc="room for test" max="200" />'.chr(0);

and it works...
I suppose I could have replaced the ."" with a chr(0) like so:
fputs($fp,$apiCommand.chr(0));

but thats not how I tested it.. would prolly work though..
Closed Thread

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:41 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.