₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,331,042 members, 8,448,337 topics. Date: Monday, 20 July 2026 at 08:26 AM

Toggle theme

Kidstell's Posts

Nairaland ForumKidstell's ProfileKidstell's Posts

1 2 3 4 5 (of 5 pages)

ProgrammingRe: How To Detect A User Mobile Phone/device Using Php Code by Kidstell:
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
ProgrammingRe: [MOD] PHP Workouts-email Validation In Php Using Any Method. by Kidstell(op): 3:23pm On Aug 24, 2013
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.
ProgrammingRe: How To Prevent A Website From Being Hacked by Kidstell: 11:28am On Aug 23, 2013
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.
ProgrammingRe: [MOD] PHP Workouts-email Validation In Php Using Any Method. by Kidstell(op): 11:00am On Aug 23, 2013
ToyinDipo: @Pattern(regexp="[a-z0-9!#$%&’*+/=?^_‘{|}~-]+(?:\\."
+"[a-z0-9!#$%&’*+/=?^_‘{|}~-]+)*@"
+"(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",
message="{invalid.email}"wink
private String email;

That was a validation method I once used with java. I got the regular expression from a java6 ee reference material
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
ProgrammingRe: Developing A Facebook-like Ticker For Nairaland by Kidstell: 4:30pm On Aug 21, 2013
worldbest: Bro! Long time, Judging from one of your posts, It's save to say you are already in Middlesex grin. Aptech is fine, I cannot wait to get out smiley. 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.
that 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
CultureRe: How Do People Actually 'Hold' The Rain? by Kidstell: 4:02pm On Aug 21, 2013
jmoore: Yes it is scientific, same applies to rainmakers.
Most of the things done in africa are scientific but hidden under the guise of juju.
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
ProgrammingRe: [MOD] PHP Workouts-email Validation In Php Using Any Method. by Kidstell(op): 11:47am On Aug 20, 2013
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
ProgrammingRe: [MOD] PHP Workouts-email Validation In Php Using Any Method. by Kidstell(op): 8:43am On Aug 20, 2013
<?php
$email =$_POST['email'];
if(!filter_var($email, FILTER_VALIDATE_EMAIL))
{
echo "E-mail is not valid";
}
else
{
echo "E-mail is valid";
}
Programming[MOD] PHP Workouts-email Validation In Php Using Any Method. by Kidstell(op):
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.
ProgrammingRe: How To Prevent A Website From Being Hacked by Kidstell: 12:57am On Aug 20, 2013
Since when did you quit coding. Well as an addition regular expressions are very good validator methods
ProgrammingRe: How To Prevent A Website From Being Hacked by Kidstell: 7:40pm On Aug 18, 2013
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
PoliticsRe: N150m Loot: Army Panel Indicts Winners Chapel by Kidstell: 8:39pm On Aug 11, 2013
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
BusinessRe: I Need 750 Usd @ N150 Per Dollar by Kidstell: 9:06am On Aug 08, 2013
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
Nairaland GeneralRe: Real-life Superheroes: People With Incredible Abilities by Kidstell: 7:21am On Apr 10, 2013
Emmyk: Cool. I'll prefer Mind-Reading or being a Psyche, dats if I were to be a super-hero cheesy
it about faith a strong one a self fulfilling faith but without work it is fruitless

1 2 3 4 5 (of 5 pages)