Kidstell's Posts
Nairaland Forum › Kidstell's Profile › Kidstell's Posts
echo $_SERVER["HTTP_USER_AGENT"]; you need to explode and get the first part. Vary very simple(sorry to say that) have you ever tried studying the output of the phpinfo(); function call. It contains virtually all the information sent in the header. Just create a new php file with the single line of code. phpinfo(); examine the output there are many global variables containing your computer info in the list just find the one with your computer's name. If you echo that variable anywhere on any page any how it will supply the specific device name. Same for browser name and version and many more |
Gradually our nairaland is getting better. Watch out for the next edition of PHP Workouts II- the topic was initially 9jerian phone number but its been solved already. Conclusively the best answer was given by Bro. Toyin Dipo using java (modified for php) <?php $email =$_POST['email'] ; if(preg_match('/[a-z0-9!#\$%&’\*\+\/=\?\^_‘\{\|\}~-]+(?:\\." \+"[a-z0-9!#\$%&’\*\+\/=\?\^_‘\{\|\}~-]+)*@" +"(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/', $email)) { echo "valid email" }else { echo "invalid email" ; } but to apply this solution in php be sure to escape the special characters try it post your correction because this moderator knows nothing about lamp or wamp. GOD BLESS MY BRETHREN. |
How do you treat/validate/sanitize your session variables adewasco2k: I think the best way is to learn hacking then you will get a better view of it,....just as others have said validating all inputs is a MUST dont always trust what is coming from users/your website all inputs should be sanitized and validated.please kindly post 1||2 useful articles about hacking that can help to enhance security consciousness of a web app dev. |
ToyinDipo: @Pattern(regexp="[a-z0-9!#$%&’*+/=?^_‘{|}~-]+(?:\\."this raises a question of what is the proper set of allowed xters. This regular exp. Allows #* which i have never noticed in anyone's email address a good modification will be to simply reduce the accepted Xters. Also with php you will have to escape these special xters "^.[$()|*+?{/\" they have special meanings |
worldbest: Bro! Long time, Judging from one of your posts, It's save to say you are already in Middlesexthat would make the application more vast. It may be a tough algorithm but bound to work on other site. Just try to make it flexible |
jmoore: Yes it is scientific, same applies to rainmakers.i know about scientific rain making but not rain holding. Furthermore i 'll like to say though, many magic tricks are either scientifical or have a scientific version not all are scientific. Also there many coincidences have been erroneously tagged as magic. Beware |
This method is so poor. And i doubt if php developers are willing to replace it for now. With this method brackets will still be allowed as input even quotes |
<?php $email =$_POST['email']; if(!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "E-mail is not valid"; } else { echo "E-mail is valid"; } |
HAVE YOU EVER VALIDATED AN EMAIL? HOW DID YOU DO IT? There are thousands of techniques lets share both public and self developed methods. As a means to keep the fire burning. I appeal to programmers to see this thread as a repository that you can always come back to check. RULES- ;-> NO MORE RULES I thinks its time we talked about which is poor and the possible flaws. |
Since when did you quit coding. Well as an addition regular expressions are very good validator methods |
A perfect input validation-thats the best way to obey the certain rule of thumb which says never trust the user. Pls don't quote this rule on your site only in your codes(like twitter stylishly putting away the hacker). The tasking fact here is user input basically are html form elements sent through get or post. Javascript is the best yet weakest means of user input validation. It becomes more difficult for a novice when you tell him that session variables are also a part of such inputs at the same time, sessions are susceptible via cookies. The address bar is just another loop hole that is mostly handled via .htaccess files. Its a line of serious business. I'm even considering the employment of a special staff to handle such. So other things will be done freely without panic. But i sincerely think what we should discuss are the best validation rules and regular expressions also url validation and control plus cookies and session validation |
Personally i'm disappointed that many of these contributors are christians. But if the headline had been re-phrased thus; "ARMY GENERAL DONATES STOLEN MONEY TO CHURCH" the argument would have been different. The church at large is under reproach. Of course not where in the scripture was a man asked the source of his offering though they were instructed on the nature, quantity and integrity. The GIVER knows by morals and instinct what integrity must be found in his offering(nature and quantity). But he chose to act contrary, the pastor must have taught his people on several occasions about the nature, quantity and integrity of offering. If you chose to deceive your self where is the pastor's fault. Who knows if he donated anonymously. Who knows if he is even a standard member. Many people who don't even know christ, will be claiming redeem, daystar or even christ embassy when filling Forms |
This request of yours is too suspicious. I think relevant authorities should be contacted. It is not strange that someone comes to naira land to look for his sisters' pants. But whoever will associate with this dollar morgue must be carefull. If he is genuine then he is in for trouble. If he is not some of us are in danger |
Emmyk: Cool. I'll prefer Mind-Reading or being a Psyche, dats if I were to be a super-heroit about faith a strong one a self fulfilling faith but without work it is fruitless |

. Aptech is fine, I cannot wait to get out
. Regarding Oga's API, we all know how it will play out if the app needed it(ofcourse it does..but wetin we go do?). but I think I could manage to use some "clever" ways. But, it wouldn't be a straight forward approach.