HHCOwner
08-16-2008, 05:49 PM
I need a code that possibly by a remote host alerts an IP or everyone viewing the page where the script is.
Any idea?
Any idea?
|
Click to See Complete Forum and Search --> : IP Alert? HHCOwner 08-16-2008, 05:49 PM I need a code that possibly by a remote host alerts an IP or everyone viewing the page where the script is. Any idea? ratcateme 08-16-2008, 05:55 PM do you mean a you want to alert the ip from where a remote script is being included from? do you mean a JS or PHP included script? Scott. HHCOwner 08-16-2008, 06:46 PM Its a feature in Radio Panel v3 where you can tell the IP and what to say and click Send and it alerts the IP or type All and it sends it to all IP's HHCOwner 08-16-2008, 07:34 PM and btw I'll take a script if you can find it in php or js Thanks ;) \\.\ 08-17-2008, 01:10 AM Its a feature in Radio Panel v3 where you can tell the IP and what to say and click Send and it alerts the IP or type All and it sends it to all IP's So what are you trying to achieve? A Clone of "Liveperson" web chat? A forum tool? What you have put and what you are asking for with the little information on your application for this makes it harder for people to help you. If they know where and what its intended use is will assist. HHCOwner 08-17-2008, 07:55 AM I'm trying to explain that it just sends a js Alert when I tell it to from maybe a remote host. ( So I'm in need of 2 Scripts - 1 that alerts the person/people - 1 that is a form used to send the alert ) Does that help? :( ratcateme 08-17-2008, 02:57 PM so you want someone connected to your site to send send a alert to someone else connected to your site. using IP's for addressing? what you need is ajax in these steps 1) all users have a ajax script that contacts the server every X seconds 2) the user who wants to send a message sends a ajax request to the server with the message and destination IP. 3) the server saves the message in a database. 4) a user connects to the server to see if there are any messages waiting for it. 5) the server checks the database and returns any messages that are waiting for it. i would recommend using a login system and usernames instead of IP's as client to client communication is imposable. so IP's mean nothing to a client. Scott. \\.\ 08-19-2008, 03:54 AM One thing you need to consider is that IP addresses are dynamic, leased for periods of use. Mine for example changes everytime I log on. Having people "Register" with a nic for the login they use would mean that people only need to remember a name and not a 4 to 12 digit number. HHCOwner 08-22-2008, 10:45 PM Your not understanding what I need. I own a website with a radio and theres also a chatroom on there and say someone's using bad language or being offensive to another user then we could alert him/her [ js alert box ] that they need to stop or they'll be banned. I need a code that lets me send the alert box to a user when I need to. Does that help? :( ratcateme 08-23-2008, 02:04 AM so a admin will be watching then you need a admin panel that has a button that sends a warning to a given user then the admins browser contacts the server who sends the alert in the next control message to the bad user Scott. \\.\ 08-23-2008, 02:39 AM My suggestion is you actually run chat software, that way you negate all the hard work of reinventing the wheel. Typical IRC clients and server will provide all sorts of toys like profanity filters, IP banning and chat bots that greet and dish up rules and help. HHCOwner 08-23-2008, 08:35 AM Then I need a script I can use that sends the warning to the user. :confused: \\.\ 08-23-2008, 03:56 PM No you wouldn't, you would have a chat window open which as a admin would have the power to kick and ban people and you can delegate responsible people to moderate the channel for when you are not around. HHCOwner 08-23-2008, 10:00 PM I was just giving an example... MY POINT IS I NEED A SCRIPT THAT ALERTS THE USER WHEN I TELL IT TO felgall 08-23-2008, 10:11 PM Any chat script will have that built into it. To be able to alert users at all like you want you will need a chat script. \\.\ 08-24-2008, 01:27 AM I was just giving an example... MY POINT IS I NEED A SCRIPT THAT ALERTS THE USER WHEN I TELL IT TO Get back in your pram won't you. IT'S SIMPLE... Run a Chat Server like IRC or one that works on the IRC networks, that way you are not limiting who can connect to you because you will be using something that has allot of support already and all the "FEATURES" you require. Using something that does not need the visitor to install software is also important and why users of FireFox for example can use the plugins that connect to IRC. MSIE would need a "chat script". If you look, you will see a few scripts that can access IRC and some offer web based access interfaces that are run from the visitors browser by way of a Chat Script. HHCOwner 08-24-2008, 09:00 AM Let me give another example: Lets say someone was on our radio and decides to head over to our forum and the radio DJ wants to tell anyone on the site that their about to announce the winner of a competition well they send an alert right before there going to announce it. I need a script to let them alert everyone when they need to :confused: \\.\ 08-24-2008, 05:05 PM Have you tried looking at software to see what it offers? acorbelli 08-25-2008, 06:44 PM so you want someone connected to your site to send send a alert to someone else connected to your site. using IP's for addressing? what you need is ajax in these steps 1) all users have a ajax script that contacts the server every X seconds 2) the user who wants to send a message sends a ajax request to the server with the message and destination IP. 3) the server saves the message in a database. 4) a user connects to the server to see if there are any messages waiting for it. 5) the server checks the database and returns any messages that are waiting for it. i would recommend using a login system and usernames instead of IP's as client to client communication is imposable. so IP's mean nothing to a client. Scott. This guy outlined the steps you'll need to take for any general web interface sending messages to specific users whether or not you are using a chat program. EDIT: What I'm saying is, the solution to your problem has been outlined in at least two ways. Both are valid and economical solutions depending on your needs, if you have questions regarding the particulars of the solutions just ask but based on the info given your question has been answered in more than one way. Kyleva2204 08-25-2008, 08:28 PM I have attached an example file/script.. Files / Purpose get_message.php / So the AJAX methods can get the message, will return NULLVOID if no message, or has expired, or has been seen already. send_alert.php / Go here to send the message, change the variable $password to the password of your liking. get_alert.html / This is the example HTML file to get the alerts. Its set to check every minute. message.txt / A file with the message and time to expire. prototype.js / The framework for AJAX (its just easier that way..) ratcateme 08-25-2008, 10:58 PM looking at your code it is very basic but what i would recommend is using a database and i see you have just copied some random JS have a look at xajax (http://xajaxproject.org/) i have used it in the past it is very good for people with little php/ajax/js experience also try to follow the steps i posted above then different users can get different messages Scott. Kyleva2204 08-25-2008, 11:03 PM looking at your code it is very basic but what i would recommend is using a database and i see you have just copied some random JS have a look at xajax (http://xajaxproject.org/) i have used it in the past it is very good for people with little php/ajax/js experience also try to follow the steps i posted above then different users can get different messages Scott. I threw it together in minutes as an example for the guy. I was hoping he would take it and run with it. I figured he needed an example to get his idea off the ground. Users and IP based could be easily implemented, like you say. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |