Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  agyat : (23 May 2013 - 01:23 AM) Wow! Mr. Sb Back Home.
@  OpaQue : (23 May 2013 - 12:44 AM) Ting
@  OpaQue : (24 April 2013 - 02:44 PM) I guess, Time to run Mycent script.
@  OpaQue : (24 April 2013 - 02:43 PM) wow.. not much spam. except habatt posting lot of links.. :P
@  yordan : (23 April 2013 - 01:04 PM) You're welcome, agyat. Nice to have been helpful. Second lesson: try full words, "you" instead of "EW".
@  agyat : (23 April 2013 - 05:03 AM) @YORDAN: tHANK EW FOR YOUR FIRST LESSON.   :D
@  yordan : (22 April 2013 - 09:43 PM) @agyat : "why don't you help me", or "please help me", or "please teach us"
@  yordan : (22 April 2013 - 09:42 PM) welcome back, velma
@  velma : (22 April 2013 - 07:51 AM) **yawns** Good to be back, wonder what is going on here :)
@  agyat : (22 April 2013 - 03:50 AM) Oh! so, why don't help me learn english..
@  yordan : (21 April 2013 - 08:38 PM) The goal mentioned by shiu : "learning english, learning computer"
@  agyat : (21 April 2013 - 06:31 PM) WHAT GOAL?
@  yordan : (20 April 2013 - 10:39 AM) yes, that's our goal. simultaneouly learning English and teaching/learning computer using.
@  shiyu : (20 April 2013 - 07:30 AM) learning english,learning computer
@  yordan : (19 April 2013 - 01:11 PM) Oh, I see, it's just a trick in order to force people looking at your texte. Somehow smart, maybe.
@  agyat : (19 April 2013 - 02:54 AM) And of course I know it is not SEO friendly.
@  agyat : (19 April 2013 - 02:52 AM) There may be two possible answers for that ....


1) Shout was posted using mobile keypad.

2) To force people read content carefully and/or with more concentration.
@  agyat : (19 April 2013 - 02:49 AM) There may be two possible answers for that ....
@  yordan : (18 April 2013 - 09:35 PM) however, why this mixing of capital letters in the middle of your text?
@  agyat : (18 April 2013 - 11:10 AM) false feelings.

Replying to 10 Things You Probably Didn’t Know About Php


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

kgd2006

Posted 21 August 2007 - 02:49 AM

This is definitely some valuable information that I will be able to use in future php scripts that I will eventually write. I am fairly new to the whole php language and this information provided me with some good insight on what I need to look out for and pay attention to. It also gave me some very important tips and tricks that will help me in my future scripts which I would look into deeper eventually. I have also been very curious about number 10 and the topic of sql injection, I have yet to grasp its true content. I always knew that it was an exploit but didnt really understand the whole story until now. But even now I feel that I have a lot more to look into if I want to not only protect a database from it but also prevent it during my script writes.

TavoxPeru

Posted 20 August 2007 - 08:26 PM

I agree with Quatrux, nothing especially new, for me only the checkdnsrr() php function is new, and what i think is more interesting is the Zend_Db DB wrapper, i will take a look to it definitvely. thanks for the URL.

Best regards,

Quatrux

Posted 18 August 2007 - 02:06 PM

Nothing especially new in those 10 tips for PHP, but I think it may be a lot of really good tips to some people, especially newbies.. one thing I didn't know and is a quite nice thing is using ip2long() and long2ip() to store IP addresses as integers instead of strings in a database, never seen those functions or would think to do something like that ;] also I wonder, how did I miss those functions, maybe they were inefficient for me, irrelevant. :blink:

dserban

Posted 18 August 2007 - 01:43 PM

If you’re using PHP 5 with MySQL 4.1 or above, consider ditching the mysql_* functions for the improved mysqli_* functions.

Or take a look at a DB wrapper, such as Zend_Db:
http://framework.zen...en/zend.db.html

Ntrix

Posted 18 August 2007 - 01:06 PM

If you’re using PHP 5 with MySQL 4.1 or above, consider ditching the mysql_* functions for the improved mysqli_* functions.

May be usefull... Many (good/usefull) improvements?

dserban

Posted 18 August 2007 - 10:29 AM

This is an article which is most likely targeted at newcomers, about SQL injection, proper datatyping, query optimization and similar problems.

http://blog.rightbra...know-about-php/

10 should be the most important. Poorly written scripts can lead to an SQL injection attack with little effort from the wrongdoer.
Also, be sure to test your scripts well. Put yourself in the place of a hacker, it is better you find any flaws before they do.
You are going to have to properly validate user input regardless. And magic quotes have to do with the way the server is set up, so it all depends on what settings your hosting provider has set up. PHP 6 is phasing out magic quotes completely.

Review the complete topic (launches new window)