sKunKbad
Members-
Posts
1,832 -
Joined
-
Last visited
-
Days Won
3
Everything posted by sKunKbad
-
Don't you know you need to know everything? When an employer is asking you to know LAMP, they just want you to know MySQL, and usually some simple .htaccess modifications. They could potentially want you to know how to manage their Linux server, but I'm not so sure this is common. Cake and Zend are just frameworks. There are lots of frameworks, and I like CodeIgniter, but if an employer is looking for you to know a specific framework, then you just have to learn it. Most are pretty easy to pick up if you have enough php experience. After making one small php site, the likelihood of you getting hired, at least around here, for a php developer job is pretty slim. Most employers are asking for 3 to 5 years of php experience, and they usually want to speak some geek with you so they know you know what your doing. If you don't know what LAMP, CAKE, and ZEND are, then they will probably show you the door. Just keep learning, and get more experience. Put out ads for freelance work, and work with small businesses to get more experience. After working with php for a few years, you will probably find that people are calling you wanting you to interview. Most of my interviews in the last year have been from people calling me. Also, if your website isn't good, the chances of people calling you are not good. Your website should be really nice.
-
It's not really my intention to have people use it without modification. The chances of somebody needing it as-is are very slim, however, there's always people asking how to log people in, and how to manage users. How to register and how to do a password recovery are common topics too. I'm happy to help people, so if anyone can use it, or use it as an example when they can't figure something out, then I'll be happy with that.
-
Well, it is what it is. I know, because you have helped me before, that you are very smart. If you see anything wrong please let me know.
-
Yeah, that is good for an hour.
-
I'm trying to validate a string, but it isn't working. It's probably the regex... but I copied and pasted it from php. So there's probably a difference between the way php uses this regex vs. javascript. Can somebody point out the error please: var myMesgRegex = /^[^-\s A-Z0-9~!@#$%^&*()_+=;:\'",.?|}{[\]\/\\\\]*$/i; var matchPos3 = mesg.search(myMesgRegex); if (mesg !== ''){ if (matchPos3 !== -1){ mesgIsGood = 'yes'; }else{ mesgIsGood = 'no'; } }else{ mesgIsGood = 'no'; }
-
This is an extension. If neccessary, the whole application directory can be moved above root. While my readme file doesn't recommend this, it is worth noting that this only requires changing a single configuration setting in index.php (already noted in the readme). Thanks for commenting. I'll make sure to change the readme to suggest that above root is obviously a better place for the application directory.
-
Many hours of work have finally produced V1 of a Auth / User Management system that I made for CI. I am not claiming to be a security expert, but I tried to study and make the Auth as secure as possible. Many people have downloaded it, but so far I haven't heard back any comments, other than the code looks clean, and that maybe I overdid it a little. I'd really appreciate some feedback on the system, and how secure or not secure it really is. While it does have some features common to typcial auth systems, I'd like to have a real assessment of potential vulnerabilities before going further. Any other comments are also appreciated. If you're interested, please check out the system; download available from http://auth.brianswebdesign.com Thanks
-
See this: Fetch a URL with Cookies in PHP
-
Failing to recive mysql data on some computers
sKunKbad replied to Zoroaster's topic in PHP Coding Help
OK, this is probably not what you want to hear, but you need to consider that from the very first code you shared, this script is destined to break. You can't update based on username LIKE anything. Sooner of later you are going to have a username like "name", and when he goes to the script that updates the database, your user's with names like "nameguy", "nameboy", "namegirl" are all going to be updated. When I saw this code, I knew it wasn't worth going further. This is the bad code: $sql91 = "UPDATE `members` SET `sfaeradio` = '$g' WHERE `username` LIKE '$username';"; mysql_query($sql91); Start over. -
All you gotta do is read the page corbin showed you. The answer is right in the parameters: It doesn't get any easier, except if you are hoping for us to do the work for you, and that's not gonna happen.
-
Run php script from another location (ip logging)
sKunKbad replied to 5kyy8lu3's topic in PHP Coding Help
The best thing for you and your buddy would be for he to use cURL and post to your file. Your file could then process the post, and return some type of output that he could then parse. XML would be easy to generate and parse, but it could even be a csv string, or even a simple integer if that is all that is required. -
You need to check within the $_FILES array, not the $_POST array. $error_message_stack = 0; if(isset($_FILES[file][tmp_name])){ // you know you have a file }else{ $error_message_stack = 1; // output an error message, repopulate the form, and skip further processing } if($error_message_stack == 0){ // do whatever you want to do with the file }
-
You can use the $_GET array to check for the value of 'id' if you need to: if(isset($_GET['id']) && is_int($_GET['id'])){ echo $_GET['id']; } It's hard to understand your specific request. You might need to post some more code and try to explain more if what I showed you doesn't help.
-
It goes before session_start() on any script that calls session_start().
-
See the docs: session_set_cookie_params() You can extend the life of your session beyond when the user closes their browser, with a persistent session cookie.
-
The examples in the docs should help you: http://us.php.net/manual/en/function.imagecreatefromjpeg.php
-
You ought to post this in the MySQL forum.
-
[SOLVED] PHP newbie, can't understand error message! :(
sKunKbad replied to Zoroaster's topic in PHP Coding Help
The error means that there was nothing returned from the SQL query. Either this sql query is not correct, or you need to test for the presence of 0. -
What it is telling you is that your query isnt returning any results. Try: if(mysql_num_rows($run) > 0) { // there was at least one row returned by the query... do something with it } else { // there was no results }
-
It is CodeIgniter. Talk on their forum is that a new release due out soon will fix this. They pride themselves on being php4 compatible, which is the reason this code is the way it is. I didn't feel it was appropriate to ask this question on their forum, because I wanted a truly unbiased response, and not just a feel-good answer.
-
PFMaBiSmAd, The reason why I was asking was that I use a framework, and it has many instances where the code tries to return a dynamic expression or a result of the new operator. In the php manual page for Returning References, it is clear that with the particular branch and version of php that I am using (5.2.6), that an E_NOTICE error is issued. When I did a search through my files in this framework, I found nearly 130 instances of "=&". It didn't take long, and I removed the ampersands, and I really felt that there was a performance increase, but I didn't know if this was real, or if I was imagining that it was loading faster. Of course not all of the 130 instances of "=&" would cause an E_NOTICE error to be issued on every request, because not every request would use every class in the framework, but I'd expect that on some requests that anywhere from 25 to 50 instances of "=&" would have triggered errors. So, while the performance increase may not be huge, perhaps my sense that my site is loading faster is not just my imagination. Thanks for your answer. It was long, and I appreciate your thoroughness.
-
Does php use any memory, and thereby slow down a script, if there are minor errors/notices that are not reported or displayed? For instance, if a script was very large, and worked fine with error reporting and display errors off, but had a lot of errors.... a couple hundred.... would there be a performance loss?
-
To build on what JsusSalv said, all you'd have to do is use filegetcontents, curl, or anything that will return the html from DMOZ, and then use a regular expression to search for your confirmation or lack of. DMOZ, ha!
-
[SOLVED] i fly my white flag in surrender
sKunKbad replied to machiavelli1079's topic in PHP Coding Help
You probably need to use a profiler, or var_dump, or print_r, and look at your data at or before the code that isn't "working".