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?
May 8th, 2007, 08:08 PM
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.
May 8th, 2007, 08:29 PM
anything in specific you'd like to share?
May 8th, 2007, 08:30 PM
'Cause it's a palindrome.
May 8th, 2007, 08:34 PM
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?
May 8th, 2007, 08:40 PM
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.
May 8th, 2007, 08:45 PM
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.
May 8th, 2007, 08:55 PM
:thumbsup: one day... one day... i will have ur powers.
May 9th, 2007, 05:24 AM
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.
May 9th, 2007, 11:38 AM
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.