| |
For about a year this site was run completely by hand. Entries had to be made into individual HTML pages. Toward the end of that year I bought a "contests" program which helped but it involved perl programming. Although PHP resembles perl in many ways (as do many other languages) perl gives cryptic error messages and often simply hangs and you have no idea where the fault is. Hence it is quite difficult to work with.
Php is quite a bit different in that the messages are (usually) reasonably easy to understand and it (usually) takes you directly to the line which is causing the problem. Also when you write in it you can flip back and forth between HTML and PHP. A special code begins PHP and another ends it and HTML is then recognized. Furthermore you can also mix javascript in the "soup" by using the codes to start and end javascript. So how does this work?
When you request an article on this site you call a file named "display_work" However, after the filename there is a number like so: display_work/151. The number is the article number. What actually happens is that the program "display_work" is called and starts to run at my server. (Server is just a computer which is dedicated to sending files out on the web) The program uses (parses) the number and then knows what it needs to assemble for you... It actually builds your web page on the fly, makes it into normal HTML and then sends it out to you. That happens in milliseconds. The REAL beauty of this is that by changing ONE program, a small one at that, I can change ALL 1000+ pages on the site! Ditto for the author's page!
But where does it get the article? In conjunction with PHP is a database located on the server... in our case, mySQL. (Structured Query Language) It contains all the articles on the site in simple text. It also contains all Member information as well as midi files and their locations. The author number and article number are indexed in this database so when the program looks for them, it can find the article, and then its content. Having this, the program continues to build the web page and then sends the finished product to you.
If you do a right mouse click and reveal source, your computer will display all the HTML that display_work created. The actual program is NEVER sent since it also contains all the codes necessary for accessing the database. As you might imagine, in the wrong hands these access codes could be disastrous!
PHP is the UNIX version of active server pages, so called since they are "active" and build pages at the server. The extension for them is .asp and they are used on Windows NT systems. (Marine Life is obviously hosted on a Unix, specifically, Linux system.)
So why does the file "display_work" lack an extension? The normal one is .php but many search engines will ignore all .php files. Through some special techniques I was able to eliminate the extension and still have my server recognize that they are in fact, PHP pages. Then what happens is the search engine sees:
http://Prose-n-Poetry.com/local/display_work/151
Now... to a search engine, that looks simply like a directory, not a file. Search engines have no problem indexing directories so that is how we "fooled 'em"
I don't bother with this technique on popup windows since search engines don't index these... however, I am careful that they are programs such as "addcomments.php" or "email_author.php" which we don't want indexed anyways. Also I have blocked out the inactive authors page so this doesn't get indexed since it would frustrate searchers to find authors who have not written anything.
History: PHP was invented in about 1995. It stands for "Personal Home Page" and began quite humbly as one man's answer to the problem of static HTML pages. Sorry but I don't have his name. Others picked up on this and soon there were many people writing the controlling program for PHP, the one on the server which recognizes PHP and knows how to interpret it.
Now... Is this clear (as mud) or did it help you to understand this site a bit better? To be sure, there are a few pages which I haven't converted over and some simply work quite well as they are. PHP is quite powerful and it would be literally impossible for this site to accept unlimited submissions without it. It automates nearly everything. It has many features which I am still learning so you will see more improvements as I learn more. (Unfortunately it cannot read articles, judge them and award prizes... hehe)
bob
|
Help Us Stop Plagiarism -
Nearly all works at PnP are original. However a few people choose to plagiarize.
To check, choose a phrase from the work, then either drag and drop to the search box or copy and paste.
click on search and works at Google will be shown which match. Just to be sure, please do this before
you recommend or rate the work highly...
|
 |
|
|
|
Select a Random Work from Stories
|
|