Linux Son

Live Like A Geek!

  • Archives

  • Hits

    • 2,771 Freinds Looked it up!
  • Meta

Posts Tagged ‘PHP’

Phpsyslog-ng tutorial was translated

Posted by hisitech on February 5, 2008

Last week I had an email from Blaise , the administrator of openmaniak.com – this site is about OpenSource software and tutorials in lots of languages – he asked me via email to translate the phpsyslog-ng tutorial to Persian and I eagerly done it . you can find the Persian translation in this address .

I ask all of my friends to help me to revise it and tell me the problems of translation ( it`s full of them!).

oohhhhh ,I forgot to tell you what it is ! ” Phpsyslog-ng is a web interface based on a php script that permit to read the logs generated by a local server or remote machines. The logs are first sent from the local or remote machines to a log collector named syslog-ng and then forwarded into a mysql database.”

Posted in Computer, Open source, PHP, Programming | Tagged: , , , | 4 Comments »

40 Tips for optimizing your php Code

Posted by hisitech on December 2, 2007

1. If a method can be static, declare it static. Speed improvement is by a factor of 4.
2. echo is faster than print.
3. Use echo’s multiple parameters instead of string concatenation.
4. Set the maxvalue for your for-loops before and not in the loop.
5. Unset your variables to free memory, especially large arrays.
6. Avoid magic like __get, __set, __autoload
7. require_once() is expensive
8. Use full paths in includes and requires, less time spent on resolving the OS paths.
9. If you need to find out the time when the script started executing, $_SERVER[’REQUEST_TIME’] is preferred to time()
10. See if you can use strncasecmp, strpbrk and stripos instead of regex

Read the rest of this entry »

Posted in Computer, Open source, PHP, Programming, Software engineering | Tagged: , | 5 Comments »