Hello im after a script that alerts the site? can someone post a link to a tut or a download linki dont know what to search in G o o g l e'

Hello im after a script that alerts the site? can someone post a link to a tut or a download linki dont know what to search in G o o g l e'
Most Djpanel do site/ip alerts check out www.habboring.com
Yes i tried PP but i couldent do it![]()
Dude, your making a DJ Panel/CMS..
You really have to know how to make a simple alert system, really it's not hard, I'd write you one, but I doubt you'll get far with it. (;
Right your trying to make a simple alert system, all it uses is abit of javascript which your cms uses. Its getting quite obvious you didnt make the cms
Publishing free website designs, watch this space!
Total number of designs published: 0
Current work in progress: Landscape Design
put the alert into a database with a timestamp, then use simple javascript and php to display it and delete it?
Coming and going...
Highers are getting the better of me
Okay, let's get a couple things straight:
1) It's usually the 'pseudo code' that kills you, not the actual code. Basically what I'm saying is that before you code anything you have to think up the logic behind the code (how it will work) and usually that's what stumps people.
2) I'm going to actually be helpful and post some pseudo code for him to follow.
Your MySQL DB Structure - Fields
id - like your primary key (automatic number)
ipaddr - the IP which the alert will be sent to
timesent - use the php time() function to make a timestamp
timeexpire - use time()+3600 for expire in 1 hour
from - the name of the DJ/user sending the message
message - the actual message to be sent
How It Works
1. Start by having your DJ/user fill out the form with the IP and Message.
2. Calculate the current time and expiry time with time().
3. Input all that info into your MySQL DB.
4. On your 'alert.php' page check if the users IP matches any of the alerts in the DB and then if so display it then delete it (refer to code below).
Pseudo Code
Now you would just have to customize that code for your usesPHP Code:<?php
$ip = $_SERVER['REMOTE_ADDR']; //Define their IP address
$qry = mysql_query("SELECT * FROM `alerts`"); //Get alerts from db
while($row = mysql_fetch_array($qry)){
if($ip == $row['ipaddr']){
$id = $row['id']; //Define what $id refers to
$from = $row['from']; //Define what $from refers to
$msg = $row['message']; // Define what $msg refers to
echo "<script>alert('$from says: $msg');</script>"; //Send js alert
mysql_query("DELETE FROM `alerts` WHERE `id` = '$id'"); //Delete
}
}
?>
[double post]
Sorry, a moderator may remove this if they wish to do so.
Edited by H0BJ0B (Forum Moderator): Please be more careful when posting. Thanks.
Last edited by H0BJ0B; 03-02-2008 at 12:43 PM.
Guys i dident make the CMS i just found it called SIIMPLYcms and im like okay ill use it i dident say i made it all all.
so basically your commiting copyright theft then.
And plaigerism?
Woah, you so shouldnt have told us that.
Coming and going...
Highers are getting the better of me
Uhh NO I SAID I DID NOT ******* MAKE THE CMS I SAID THAT I FOUND IT! OMG READ THE ******* POST!
Want to hide these adverts? Register an account for free!