Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Why Choose PHP?

  1. #1
    Member e><ius's Avatar
    Join Date
    Mar 2007
    Location
    So.Cal.
    Posts
    61

    Why Choose PHP?

    For all those who are fans of PHP web language, why do you love it so much? What do u do with it? What can you do with it?

    Im asking because I have been web-designing with mostly html, minor javascript, minor css, and minor php since 2000. and my friend tossed me his brand new PHP book, and i dont know if its worth my time. i havent a clue of possible benefits except for a "contact us" email form and mySQL database.

  2. #2
    Senior Member kr5kernel's Avatar
    Join Date
    Mar 2004
    Posts
    347
    Why Choose HTML? Why Choose Perl? Different languages are better at different things, like speed and ease of use. I do lots of stuff in PHP, stuff that could be done in python,perl,etc. Its like any other language, if you can imagine something, you can build it. PHP is just another accepted way of using these building blocks to accomplish your goal.
    kr5kernel
    (kr5kernel at hotmail dot com)
    Linux: Making Penguins Cool Since 1994.

  3. #3
    Member e><ius's Avatar
    Join Date
    Mar 2007
    Location
    So.Cal.
    Posts
    61
    ker5kernal,

    anything in specific you'd like to share?

  4. #4
    Senior Member JPnyc's Avatar
    Join Date
    Jan 2005
    Posts
    2,734
    'Cause it's a palindrome.

  5. #5
    Senior Member kr5kernel's Avatar
    Join Date
    Mar 2004
    Posts
    347

    PHP

    Sure, I've done your run of the mill contact forms, and using PHP in integrate applications into MySQL databases...I have done mashups with PHP and Asterisk, allowing users to call a phone number and get the output of php scripts. PHP to generate xml, rss, etc. PHP gives you the ability to bulid functions so you can replicate tasks without having to recode, it saves time and is widely used. Does that help?
    kr5kernel
    (kr5kernel at hotmail dot com)
    Linux: Making Penguins Cool Since 1994.

  6. #6
    Member e><ius's Avatar
    Join Date
    Mar 2007
    Location
    So.Cal.
    Posts
    61
    yes actually!

    one thing that really caught my eye was the PHP + Asterisk setup. so what kinda output data would you be receiving, and how could u integrate a voip (or phoneline) setup with PHP script? sounds amazing to have.

  7. #7
    Senior Member kr5kernel's Avatar
    Join Date
    Mar 2004
    Posts
    347
    Its pretty simple, you setup an extension to pull some php and run it through festival. Instant robot voice reading whatever you want. Add some navigable menus with a dialplan, and it then becomes interactive.
    kr5kernel
    (kr5kernel at hotmail dot com)
    Linux: Making Penguins Cool Since 1994.

  8. #8
    Member e><ius's Avatar
    Join Date
    Mar 2007
    Location
    So.Cal.
    Posts
    61
    one day... one day... i will have ur powers.

  9. #9
    I use it all the time in the websites I build - even the simple ones. The main things I use it for is:

    * headers and footers via include(); so I only need to change 1 central file to update the entire site

    * menus and sub menus using simple arrays so that if a section of the site has a new page added I just update the master array and all pages in that section get the new page. You can do it with a simple include(); but using an array I can do things like make the current section or page display differently in the menu via style rules.

    * random image banners

    It just makes life a lot easier doing those things - and they don't require a huge learning curve.

    Cheers,
    Niggles

  10. #10
    Senior Member Aardpsymon's Avatar
    Join Date
    Feb 2007
    Location
    St Annes (aaaa!)
    Posts
    434
    I can one up you there niggles.

    I use includes for navbars, headers and footers.

    I have made random images although last time that was in java. I also used it for random songs, quotes and so on.

    Also, at the bottom of every page there's PHP to grab the last modified date and display it.

    My current page has a little bit of PHP in it to tweak the css depending on browser. IE6 handles the layout parts of the page differently to IE7 and firefox. (I have yet to test in others) so it grabs the user agent and if its IE 6 does a slightly different layout.

    (IE5 just curls up and cries. But then, if you still have IE5 I don't want you on my website :P)

    I'm looking at writing in a PHP tracking script to my site to see what pages people go on, for how long and where from. Basically, worlds best hit counter cept I wrote it.

    In terms of PHP vs say Perl, I would use perl for a completely generated page like output from a DB and PHP for tweaks to a mostly static page.

    You have to balance scripted elements vs static elements. Scripts make updates easier (especially includes) but obviously put more load on the server. It all depends how much load you expect, the spec of the server and how often you expect updates.
    If the world doesn't stop annoying me I will name my kids ";DROP DATABASE;" and get revenge.

Similar Threads

  1. Apache, PHP, MySQL with basic security settings.
    By nightcat in forum The Security Tutorials Forum
    Replies: 9
    Last Post: May 28th, 2005, 02:47 AM
  2. PHP Flaws
    By SDK in forum Web Security
    Replies: 19
    Last Post: December 20th, 2004, 05:31 PM
  3. Tutorial: Apache 2.0.49 and PHP 4.3.7!
    By Vorlin in forum Other Tutorials Forum
    Replies: 3
    Last Post: June 15th, 2004, 10:25 PM
  4. Installing Apache and PHP on Linux
    By HDD in forum Other Tutorials Forum
    Replies: 2
    Last Post: February 1st, 2004, 08:05 PM
  5. flash for website !!!!!!!!!!!!!!
    By thuongtamnhan in forum AntiOnline's General Chit Chat
    Replies: 3
    Last Post: November 1st, 2003, 03:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •