I'm working on a word filter for my site but I want to
delete bad words such as a$$ but I want to allow the word
assistant but so far with preg_replace i'm getting
istant as it's removing the other
anyone have any suggestions??
Thank You!
I am writing a chat script and wanted to avoid a problem I had with my old cgi chat called "ghosting".
I have the script to where you must login with a phpsessionID and it gets your referer. lately though because of norton etc I am not getting a referer?
other than a referer is there a way to...
I need help deleting duplicates but I want to allow only one dupe.
i.e. very very is allowed but very very very isnt?
this is what I'm using so far. and it deletes the dupe but it deletes all dupes so I cant have a double.
$FORM{'message'} =~ s/(\b\S+)(\s+\1\b)+/$1/g;
Thanks for any input
is there an easy way to check for https and if it's not
redirect to a login page?
what I'm trying to do is I have a user login that is https://site.com/login.php
after that it takes them to
https://site.com/securearea.php
and I want to prevent them from going to...
I have a form that has a update and log off button.
I changed the button from
<input type=submit name=logoff value=logoff>
to
<input type=submit name=logtimer value=logoff>
log timer is a javascript that opens a new window with
a warning, you have 2:00 and it countsdown at pageload.
is...
I have several text files. (and unfortunatly they need to be text instead of mysql)
the data is
Username1:MD5CryptedPassword
Username2:MD5CryptedPassword
Username3:MD5CryptedPassword
Username4:MD5CryptedPassword
I have an existing script that inserts by appending the
username and password at...
Hello all, I am trying to get the following to work. What it's supossed to do is read in the $SESS_time and give me
the var that should be $time1 but everytime I do it changes
on refresh. i.e. $SESS_time = time();
how do you lock time(); to not refresh on reload?
the following works if I hard...
I've got the following and it lets me view the file test.log and whatever I type gets appended to the bottom. what I want to be able to do is also remove from the file.
the files contents are:
test
1.1.1.1
hello
blah
blah blah blah
I want to say remove hello. it will be random. the text shows...
I want to remove the following from the scripts. I am planning to use str_replace to remove it but how would I replace the duplicated user name in the following |username|?
$textbg = str_replace("<script LANGUAGE=\"Javascript\"> if (parent.frames[2].ignore.indexOf(\""...
I have several files in directories
the files are like so
/monday/*.log (day logs)
/monday/*.pmlog (night logs)
/tuesday/*.log
/tuesday/*.pmlog
....and so on
how do I read the contents of all of mondays logs and pmlogs to be added to an array and then edited by another script for reports...
I have several log files which are in this format:
logfile1.log
<script LANGUAGE="Javascript"> if (parent.frames[2].ignore.indexOf("|NickName|") == -1) {document.write('<font color=color><B><big>NickName</big></B> - Message</font><br>'); } </script>
I tried a
$line1 =...
What I'm trying to do is assign temp passwords to go to a form page to fill out info and on submit the temp account is gone and I'll take the email and give a new perm account to the individual.
I have a script that reads the lines into vars and then checks the TEMP usernames and password...
I have this right now and it checks for character spacing and replaces with a predefined string.
$FORM{'message'} = "Line to long, please limit to 64 chars" if $FORM{'message'} =~ /\S{64}/;
my question is can you have it check for repeating strings.
i.e a person types in...
I have a text file that includes the following info that is generated by my cgi scripts.
name, ip, session id
name, ip, session id
I want to read that into an array and later disply
online users by name, ip, session id.
not sure how to start on this.
not sure how to phrase it but I'll describe what I'm trying to do.
I have a form that as of current has a text box for nickname, a dropdown for color and a submit.
I want to modify it for the following:
nickname - textbox
dropdown - color (by #FFFFFF)
dropdown - color (by "white")...
I have a need to run SCO Xenix 386 binaries under linux
is iBCS or abi-linux better and which kernel version is best to use it with?
(Current results are that redhat6.2 with iBCS infinite loops (cpu busy) when trying to run the following program:
main() { }
caldera eserver3.1 stops with...
I have a perl script which does mysql calls. it's easier to do more complex calls in php so I want to call my script and just pass the $result field to be printed.
my question is how to I call php? just add <?php ?> in the perl script?
thanks for your input
CBB
is there a way to add a 0 in front of the counter for single digits.
i.e. 01, 02, 03, 04, 05, 06, 07, 08, 09.
then it'll go 10, 11, 12
what I have been using is
for( $counter = 1; $counter < $DateM; $counter++)
{
dostuff
}
TIA
I have a cron script that ftps sitestat files from my other pc daily. I've been noticing that some files dont transfer or come in garbage. is there a way to verify a file transfer via shell script? if so can you make it retry on fail?
Thanks.
below is what I have so far:
#!/bin/sh
##########...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.