I’m not sure if this belongs here or in Serverside because I’m not really sure what it would take to do this.
Ok, well I have a mailer thing that mails to my cell phone, but it costs money to get the messages so this is what I want to do.
I want to limit people to 2 or 3 messages a day. I don’t know if I would need to use PHP in conjunction with some Actionscript or what. Also I want to have a way to make it so certain people can use it as much as they want. So I’m wondering if I could password protect it. Or just not block certain IP addresses. I don’t know if this would be extremely hard to do or not.
Any help would be great
Thanks
umm well if u use php/mysql u could easily just use cookies or wat i would to is create a user signup and login page, this also help in keeping track of users using the services and u can get much better stats, and use mysql or other db to load a varivble and limit it to how many msg’s u want sent, and give the users u want unlimited msg’s through the php script.
with the ip idea, not to crash hot a way to go about it, ip’s change constantly on dial up and periodicly on cable (not sure about adsl) so this isnt t wise a way to do it.
hope this helped…
if u need help with the php mysql scripts id be glad to help…//
hey xzyfer… didnt even see your response…
I don’t actually have any ‘services’ or anything, and there are no members to my page, should I make it so you have to sign up or something?
Lol, sorry, I’m really new to server side stuffs
No clue how to go about doin this
The problem with this is that some services use one IP for all their users (coughAOLcough) and others switch IP’s each time you turn off your modem (coughCableUserscough).
One way you could do this is to use cookies on the user, not neccesarily sign-up, but give each new user a unique ID stored in their cookies (you’ll know they need one if they don’t have a cookie stored from you) and block that instead.
Yeah, the cookie thing makes sense
I still have no idea how to go about doing this… man I hate bein so dumb, well if anybody wants to spend some time helpin me out with this I would really appreciate it, it’s not vital tho.
This might need some tweaking, but it would generally look like this:
(This is in ASP)
<%
Dim CN, RS
Set CN = Server.CreateObject("ADODB.connection")
Set RS = Server.CreateObject("ADODB.recordset")
CN.connect "Insert Connection String here"
RS.open CN, "TableUID", 0, 1, 2
If Request.cookies.count = 0 Then
Response.cookies("UID") = RS.count
RS.addNew
RS("UID") = RS.count
RS.moveFirst
RS.update()
Else
RS.move Response.cookies("UID")
If RS("Banned") = "Yes" Then
RS.Close
CN.Close
Set RS = Nothing
Set CN = Nothing
Response.Redirect("YouAreBanned.html")
End If
End If
RS.Close
CN.Close
Set RS = Nothing
Set CN = Nothing
%>
There would be a database somewhere with a table called TableUID in it, and the table would have two columns: UID and Banned.
If you wanna ban someone, you’d type “Yes” (without the quotes) in the Banned column.
thanks man, but I know absolutely no ASP
I am just starting to learn PHP, so if there is a way to do it php, that would be better, but I could learn asp if i need to i guess.
So uhhh. I have no idea what to do with that code, like where to put it or anything… man im dumb
Anyway, you’d put that in the first site you would enter, such as the “Enter site” page. You’d have to figure out the connection string tho, I can’t help with that. Maybe someone else here knows.
yer sure i can spare some tym to help u…
just email me and we can start it up…
im goin on hols for a week, ill be back soo and ill check up on this post…
email @ factoflife@hotmail.com