23
Jan 06

PHP Includes!

Have you ever found out about something that would have made your entire life so much easier? I had this experience recently with the concept of building websites using PHP includes.

In a nutshell, PHP includes allow you to build webpages using modular sections or code blocks.

PHP is, of course, a server-side scripting language, which means it can be used to create dynamic content for the web. With PHP you can interact with other applications on the server as well as do things like set cookies, process forms, store input in a database, etc. That’s great stuff, but most people may not need to take advantage of that. The thing most people need to know about is the use of PHP for creating multi-page websites using includes. One of the biggest problems (if you don’t use PHP) is making changes to an entire site. Let’s say for example you have a website with hundreds of individual pages. Without includes, you would have to download and edit each of those files to reflect the new changes. Even if you did some find-replace mojo, you’d still have to edit each of those pages and reupload them to the web server. But, if you use includes you could create a template that each page would use. When you needed to make changes you would simply change the content of the particular include. So, for example, any page on a site could be arranged like this:

header include (separate file like header.inc.php)
content
footer include (separate file like footer.inc.php)

To change the navigation in the header across the entire site, you would just alter the header.inc.php file instead of having to download and change each separate page.


21
Jan 06

Untitled

cell2


20
Jan 06

Hamster, snake best friends

Hamster, snake best friends at Tokyo zoo:
TOKYO –Gohan and Aochan make strange bedfellows: one’s a 3.5-inch dwarf hamster; the other is a four-foot rat snake. Zookeepers at Tokyo’s Mutsugoro Okoku zoo presented the hamster — whose name means “meal” in Japanese — to Aochan as a tasty morsel in October, after the snake refused to eat frozen mice.

440w


16
Jan 06

My great grandfather in the Sanitarium



My great grandfather in the Sanitarium, uploaded by letterneversent at 17 Jan ’06, 5.28am PST.

…for tuberculosis.


16
Jan 06

Flickr Set: Fort Worth Stock Show Parade



Brightly colored stage coach, uploaded by letterneversent at 15 Jan ’06, 3.49pm PST.

I went to the parade on Saturday morning in downtown Fort Worth. It was a beautiful day and it was nice to see all the animals and people dressed up. I forgot how much I loved marching bands, especially the drums. Here’s a guy riding a longhorn:

Man riding longhorn


10
Jan 06

The Last iPod Video Guide You’ll Ever Need

The Last iPod Video Guide You’ll Ever Need

Student Life on the Facebook via waxy.org


09
Jan 06

The Whore of Babylon

When they coined the phrase, “everything is bigger in Texas”, they were talking about Dallas.

Everything here is bigger and ten times more (insert adjective) than anywhere else. Right off of the highway you’ll see Silver City, a huge “gentleman’s club”, which appears to be at least two stories tall. Further downtown you’ll see signs advertising “the world’s largest gay adult video store”, the world’s largest condom store, etc. Most of the major highways have at least ten lanes. Even the McDonald’s restaurants are enormous. Near Valley View mall, there is even one shaped like a giant happy meal. I’m not kidding.

Dallas is Babylon. It is a world of extremes existing in an uneasy cease-fire. It is a modern gold rush town complete with throngs of pious Christians and painted, fallen men and women puffy with plastic surgery. In Dallas, there are multi-million dollar mansions blocks from low-income apartments and methadone clinics, giagantic churches next door to 10,000 sqare foot liquor stores with fifty foot neon cowboys.

One day, not knowing my way around, I drove a few streets south of Uptown and got stuck behind two guys in a truck buying crack cocaine. As shiny expensive cars passed overhead on the tollway, I felt my first pangs of love for this beautiful, ugly city.


08
Jan 06

JT Leroy is a woman

Via metafilter, JT Leroy De-Masked. JT Leroy is actually two forty-something women.


07
Jan 06

Toll tag

One thing about taking the tollway in Dallas is that it helps to use a tolltag. Basically, this is a credit-card shaped plastic transponder you paste to your windshield. When you go through a tollgate it automatically debits funds for the toll from an account you have with the North Texas Tollway Authority. This ends up being quicker for everyone since you don’t have to scramble to find change for the toll. In exchange for using the transponder, you are given a slight discount on the total cost of the toll. So, for example, if the toll starts out at 75 cents when you enter the tollway, you might pay only 60 cents, which ends up being a sizable discount of around 20%. As you use the tollway, the funds in your account are replenished from the credit card you put on file with the tollway authority.

The North Texas Tollway Authority (NTTA) is a self-supporting political sub-division of the State. The NTTA receives no tax funds from any source. Debt service, operations and maintenance are funded entirely from user fees (tolls).

I’m growing to like the tollway. It’s less crowded than the other major highways in Dallas and it is a straight shot to where I work up in Addison. It’s pretty much due north and it saves me about 20-25 minutes every day. Judging from the amount of traffic during the day, the tollways must be a big money maker for someone. If you figure each car is paying anywhere from $.75-1.50 per trip, twice a day you start to get some huge numbers.

Since the NTTA is a quasi-governmental entity you can review the financials on the NTTA website. From there you find some interesting information:

Total operating revenues were $165.3 million and $152.5 million for FY 2004 and FY 2003, respectively. System toll revenues for FY 2004 were $160.7 million, a seven point six percent (7.6%) increase over FY 2003 compared to an eight point two percent (8.2%) increase in FY 2003 over FY 2002. Traffic on the System continues to grow, with approximately 863,100 and 811,000 average daily transactions in FY 2004 and FY 2003, respectively, and almost seventy-one percent (71%) collected electronically. Collection of tolls electronically increased over 2003, which was sixty-eight percent (68%). Actual traffic on the PGBT continues to exceed Traffic & Revenue Engineer estimates.

It’s interesting to see what kind of funds are flowing into the system. Traffic and highway systems are hugely complex and important systems involving millions of people and trillions of dollars. Everything we enjoy about modern life is made possible by the ability to get people, goods, and services in and out of the city.