Archive for the ‘Programming Answers’ Category

What Is Deprecated Code And Why Should I Upgrade My Server?

Thursday, March 6th, 2008

By definition, “deprecate” means to look upon something in a poor light, or as lower quality. In reference to code, deprecation refers to code that is not considered up to date and is likely to lose community or company support. The deprecation process applies to all code languages, including PHP Programming. Understanding the deprecation process is important for owners of websites that use dynamic programming such as PHP, JAVA, ASP, CFM, and others. (more…)

PHP Headers: Status Code Definitions (Reference List)

Thursday, January 3rd, 2008

The following list is taken from W3 and posted here for easy reference. These are to be used for various situations when you want to override the default status sent by the server. Situations include when your content is deleted, but you do not want the search engine to see a broken link or missing page. If your content moves to a new location, you can inform browsers and engines to permanently look to the new location, not the old one. Keep the original page and return a header with the example below. Make sure your headers are sent BEFORE any content is sent, else you will likely get an error, or the header may be ignored. Explanations of each Status Code is included below. Please refer to W3 for latest updates and additions.

Example: header(’HTTP/1.1 301 Moved Permanently’); (more…)

Automating Image Uploads And MySQL Database Tracking

Saturday, October 6th, 2007

These days everyone wants to upload their images to a web application. Whether it’s a free public site like Photobucket, or an eCommerce Web Site like Shutterstock or Flickr, the concepts are the same. The intent is to provide a system for web users with no web programming skills, which lets them upload a single file, and do nothing else. The result is the automated manipulation of image uploads into thumbnails, various intermediate sizes, perhaps retaining the original image upload, and tracking all components with a MySQL Database. (more…)

Finding Longitude & Latitude From Google Maps

Wednesday, September 12th, 2007

This is a really simple problem to solve. Simply navigate to the map position you want the Google Maps longitude and latitude for. Make sure your focal point is at the center of the map frame. Into your browser’s address field type and enter the following string:

javascript:void(prompt(‘‘,gApplication.getMap().getCenter()));

The quote marks after “prompt(” should be two single apostrophe marks. You should get a Javascript popup window showing you the data you need in the correct format for use with Google Maps API. Make sure you signup for your free API Key, which provides unlimited access to Google Maps for specified domains/directories.

Using JavaScript to Embed QuickTime Content

Thursday, August 9th, 2007

Apple provides a JavaScript utility to generate the required tags to embed QuickTime content in a web page. Using this utility greatly simplifies the necessary code to embed a movie, as it automatically supplies such information as the QuickTime Class ID, code base, and plugins page. This has two main advantages over typing the tags manually: it requires much less code; and it works seamlessly with Internet Explorer for Windows, versions 6 and later, avoiding the “Click OK to enable ActiveX control” dialog box. (more…)

Setting Up GoDaddy Email Accounts

Monday, August 6th, 2007

MX Record Configuration
Log on to your hosting provider or third-party domain name system manager.
Change your MX records to:
MX 0 = smtp.secureserver.net
MX 10 = mailstore1.secureserver.net

Domain-specific aliases are easier to remember:
CNAME mail.mydomain.com -> pop.secureserver.net or smtpout.secureserver.net
CNAME pop.mydomain.com -> pop.secureserver.net
CNAME smtp.mydomain.com -> smtpout.secureserver.net

POP (Incoming mail server)
Port: 110
Server: pop.secureserver.net
Username: your whole email address
SSL: Nope, that sucks unless you get certs

SMTP (outgoing mail server)
Port: 80 (Not the standard port 25!)
Server: smtpout.secureserver.net
Username: your whole email address
SSL: Nope, that sucks unless you get certs
SMTP must authenticate
You do not need to check mail before sending mail

Protecting Your Image Upload Directory And Files

Friday, July 27th, 2007

There are a few reasons why you should consider the network security for your upload directories. Whether you allow image uploads only, or various file types, security is extremely important. How you apply the available layers of security using the file system and PHP depends on your level of paranoia and the sensitivity of the uploaded content. (more…)


Need a web and database programmer? Contact The PHP Kemist

eCommerce Web Site Design | PHP Web Programmers | Website Development & Search Engine Optimization
Network Security Programmers | Shopping Carts For eCommerce | Internet & Search Engine Marketing
Salt Lake City Utah Website Design | Bay Area California Website Design | San Jose California Website Design