Orionsbelter Posted May 9, 2008 Share Posted May 9, 2008 Hi i would like a pop up for my site. i bit like msn messagener like when someone comes online it pops up. i would like to make one like that which also tell my when my users friends are online. but to start with just a basic one saying hello, $username etc.. if anyone knows how to do this please help me:D many thanks:D Quote Link to comment Share on other sites More sharing options...
NorthWestSimulations Posted May 9, 2008 Share Posted May 9, 2008 javascript my friend try this: <script language="javascript1.5"> alert("<?php echo 'Hello '.$username.''; ?>") </script> I havent tryed it so not sure if itll work. Quote Link to comment Share on other sites More sharing options...
Orionsbelter Posted May 9, 2008 Author Share Posted May 9, 2008 thank mate, but i want a box to come up like messenger but thanks anyway Quote Link to comment Share on other sites More sharing options...
radar Posted May 9, 2008 Share Posted May 9, 2008 an alert will tell them that they themselves just logged in.. In order for this to work through PHP I believe you would have to refresh the screen say every 10 seconds or so... In my mind, I would use a very small iframe (1 x 1), and create a PHP script that loads in that iframe... this way no one can see the iframe, nor can it be edited... Then in the script have the page refresh every 10 seconds or so... and have it run the alert from there if they just logged in which you can figure out by using time().. if user_intime => time() - 10 { alert 'hey this douchebag just logged in'; } thats just my quick ramble of a possibility.. Quote Link to comment Share on other sites More sharing options...
NorthWestSimulations Posted May 9, 2008 Share Posted May 9, 2008 thank mate, but i want a box to come up like messenger but thanks anyway thats still javascript. A box like MSN is a alot more than a few lines. You'll have to really know your way around javascript to do it as good as they have. This type of skill is far above what I am capable of doing. Sorry radar beat me to the post... His post is a little more helpful than mine though Quote Link to comment Share on other sites More sharing options...
DarkWater Posted May 9, 2008 Share Posted May 9, 2008 Use Ajax to check every 120 seconds for new logins and stuff, and look online for sliding javascript boxes. Quote Link to comment Share on other sites More sharing options...
Orionsbelter Posted May 9, 2008 Author Share Posted May 9, 2008 ok cheers guys Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.