Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
What's this PHP code mean?
Name: robber2 Date: October 26, 2007 at 08:06:46 Pacific OS: w xp home CPU/Ram: 2 gig celeron, 256 MB Product: dell dim 2350
Comment:
What exactly is this snippet of PHP checking for :
function checkOK($field) { if (eregi("\r",$field) || eregi("\n",$field)){ die("Invalid Input!"); } }
Name: Michael J (by mjdamato) Date: October 26, 2007 at 23:45:27 Pacific
Reply:
It is a function that takes a string variable. If that string variable contains a newline (\n) or a carriage return (\r) then the function will halt any further execution of the script and display the error message "Invalid Input!"
Michael J
0
Response Number 2
Name: Laler Date: October 27, 2007 at 02:06:31 Pacific
Reply:
And the purpose is to spot spambots that tries to use this "bug":
Summary: i need help with a php code.. how do i make this php code <?php $logfile= 'log.html'; $IP = $_SERVER['REMOTE_ADDR']; $logdetails= date("F j, Y, g:i a") . ': ' . ''.$_SERVER['REMOTE_ADDR'].''; $...
Summary: Perhaps the obviously enlightened individuals who are criticizing google's method of ranking pages would care to create a better system. After all, what's so hard about indexing every page on the int...
Summary: Hello, I have written a PHP code to read a file and dump everything to the screen but it does not work. CAn anyone tell me what is wrong with my code? thank. <?php $FILEPATH = "./.config/.htusers.p...