Aug 28th, 2008, 10:49 AM
#1
Thread Starter
Lively Member
instant messenger on my website
How can I put an instant web messenger on my website?
Aug 31st, 2008, 09:57 AM
#2
Re: instant messenger on my website
When you say instant messenger, do you mean to communicate with MSN, AIM, GTalk etc, or do you want like an instant chat feature, where you can type in messages to anyone currently viewing the site?
Also, do you have an example of another website that has an IM function similar to what you desire?
Aug 31st, 2008, 09:23 PM
#3
Thread Starter
Lively Member
Re: instant messenger on my website
I was looking for something that doesnt use yahoo, msn, or any other service like that. The users would still need to log in. I was looking for something similar to php121 (www.php121.com ). Thanks for the help!
Sep 1st, 2008, 01:45 AM
#4
Re: instant messenger on my website
I suppose you don't want to use PHP121 then?
You can create your own using AJAX. Confirm this is what you want, and i can give you the basic steps for that.
My usual boring signature: Something
Sep 1st, 2008, 01:33 PM
#5
Thread Starter
Lively Member
Re: instant messenger on my website
I do not want to use php121. I am new to this and dont know AJAX or php or anything like that.
Sep 1st, 2008, 01:41 PM
#6
Re: instant messenger on my website
Well this is the basic process of the whole thing:
User A Starts conversation #1234 With User B User A sents the message "Hello" which is stored in a database under convo #1234 User B send the message "Hey, whats up" which is also stored in the db under convo #1234 While all of this is happening, both windows are refreshing automatically (or using ajax) to query the database looking for convo #1234 messages.
Does that make any sense? I feel like i was not clear enough.
My usual boring signature: Something
Sep 1st, 2008, 03:08 PM
#7
Re: instant messenger on my website
Originally Posted by
red_bull_NRG
I do not want to use php121. I am new to this and dont know AJAX or php or anything like that.
Then you are posting in the wrong forum.
Sep 1st, 2008, 03:09 PM
#8
Re: instant messenger on my website
Originally Posted by
dclamp
Does that make any sense? I feel like i was not clear enough.
No.
Sep 1st, 2008, 04:23 PM
#9
Re: instant messenger on my website
Originally Posted by
visualAd
No.
yeah but see, you know how to do it... so be quiet.
My usual boring signature: Something
Sep 1st, 2008, 05:51 PM
#10
Thread Starter
Lively Member
Re: instant messenger on my website
Originally Posted by
dclamp
Does that make any sense? I feel like i was not clear enough.
Sorry, but it didnt make sense. As I said, I have absolutely no experience with stuff like this.
Sep 1st, 2008, 05:54 PM
#11
Re: instant messenger on my website
Ok no problem. Maybe i can make a illustration.
My usual boring signature: Something
Sep 1st, 2008, 06:04 PM
#12
Re: instant messenger on my website
Originally Posted by
dclamp
Ok no problem. Maybe i can make a illustration.
here. this is the best i can do. If you still dont understand, i can just start writing sample code
Attached Images
My usual boring signature: Something
Sep 1st, 2008, 06:24 PM
#13
Thread Starter
Lively Member
Re: instant messenger on my website
thanks for the illustration, now I understand how it works. But how can I program it?
Sep 1st, 2008, 07:09 PM
#14
Re: instant messenger on my website
I am glad you understand that. To make it easier for both of us, i am going to create the tutorial on my computer and upload it when i am done. Should be done tonight.
I advise you take a look at the MySQL Help link in my signature. That explains MySQL queries, and well as using it with PHP.
My usual boring signature: Something
Sep 1st, 2008, 09:55 PM
#15
Re: instant messenger on my website
ok, here is a VERY basic IM system in php. The code is somewhat sloppy because i wrote it in 2 hours. there are comments everywhere.
Please ask questions regarding it, i am happy to answer.
Attached Files
My usual boring signature: Something
Sep 3rd, 2008, 07:51 PM
#16
Thread Starter
Lively Member
Re: instant messenger on my website
Thanks so much for the help with the messenger. It's working great. I still have a couple questions though:
How can I set up a MySQL database to handle the passwords and usernames?
Also, how can I make a register page so people can set up a username and password?
Sep 3rd, 2008, 09:13 PM
#17
Re: instant messenger on my website
oops, i forgot to add the databases in the file.
Code:
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `subsoft_chatdb`
--
-- --------------------------------------------------------
--
-- Table structure for table `chatsessions`
--
CREATE TABLE IF NOT EXISTS `chatsessions` (
`chatID` int(10) unsigned NOT NULL auto_increment,
`sessionID` text NOT NULL,
`fromuserID` varchar(45) default NULL,
`startTime` varchar(45) NOT NULL,
`endTime` varchar(45) NOT NULL,
`touserID` varchar(45) NOT NULL,
`status` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`chatID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
--
-- Dumping data for table `chatsessions`
--
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE IF NOT EXISTS `messages` (
`messageID` int(10) unsigned NOT NULL auto_increment,
`sessionID` varchar(45) NOT NULL,
`fromuserID` varchar(45) NOT NULL,
`touserID` varchar(45) NOT NULL,
`sendTime` varchar(45) NOT NULL,
`message` text NOT NULL,
PRIMARY KEY (`messageID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `messages`
--
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`userID` int(10) unsigned NOT NULL auto_increment,
`username` varchar(45) NOT NULL,
`password` varchar(45) NOT NULL,
PRIMARY KEY (`userID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`userID`, `username`, `password`) VALUES
(1, 'dclamp', '5f4dcc3b5aa765d61d8327deb882cf99'),
(2, 'penagate', '5f4dcc3b5aa765d61d8327deb882cf99'),
(3, 'robdog', '5f4dcc3b5aa765d61d8327deb882cf99');
My usual boring signature: Something
Sep 3rd, 2008, 09:15 PM
#18
Re: instant messenger on my website
Originally Posted by
red_bull_NRG
Also, how can I make a register page so people can set up a username and password?
Make a form with a username field and a password field and set the form action to that page, and at the top use mysql functions to add it to the database.
I am not here do make your whole project for you, but i am more than happy to assist you when you have problems.
For more information on mysql fuctions, have a look at the link in my signature. When you get something made up, post it here and we can have a look at it.
My usual boring signature: Something
Sep 5th, 2008, 12:16 AM
#19
Frenzied Member
Re: instant messenger on my website
Originally Posted by
red_bull_NRG
thanks for the illustration, now I understand how it works. But how can I program it?
no offence mate, but maybe a good start would be to learn to program?
Oct 13th, 2008, 11:44 PM
#20
New Member
Re: instant messenger on my website
Originally Posted by
dclamp
Make a form with a username field and a password field and set the form action to that page, and at the top use mysql functions to add it to the database.
I am not here do make your whole project for you, but i am more than happy to assist you when you have problems.
For more information on mysql fuctions, have a look at the link in my signature. When you get something made up, post it here and we can have a look at it.
Dude, I am trying to implement an Instant Messenger on a Web Browser. Which database should the login page be access/query to store the username and password details?
Thanks!
Thanks!
Last edited by dedach; Oct 14th, 2008 at 12:26 AM .
Oct 14th, 2008, 12:01 AM
#21
Re: instant messenger on my website
Your better off going with an already made program. The one i wrote was made in 5 minutes, and looks (and works) like crap.
php121 is a great PHP IM application that is easily integrated into your site.
We would be more then happy to assist you in integration.
My usual boring signature: Something
Oct 14th, 2008, 12:56 AM
#22
New Member
Re: instant messenger on my website
Originally Posted by
dclamp
Your better off going with an already made program. The one i wrote was made in 5 minutes, and looks (and works) like crap.
php121 is a great PHP IM application that is easily integrated into your site.
We would be more then happy to assist you in integration.
Thanks for your help!
Actually, I wanted to learn how to do it myself rather than use something already present. If you could help me in that, I'd be glad.
Or even ajax-im for that matter seems good, if I can manage to get it working myself.
I am still trying to figure out which database does login query?
Any tutorials that can help me better understand the code?
thnx a lot!!
Oct 14th, 2008, 06:21 PM
#23
Re: instant messenger on my website
table users controls the login. And it uses md5 encryption to store the password.
My usual boring signature: Something
Oct 16th, 2008, 07:27 AM
#24
Re: instant messenger on my website
It's never a bad idea to look at other examples, if only to see how the code works.
http://www.hotscripts.com/PHP/Script...pts/index.html
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width