By using the Google Maps API in conjunction with a proprietary routing algorithm from Sunrise Resources LLC, you can map the least time route and calculate the estimated route time and determine whether an address is within your defined delivery area.

Sunrise Resources LLC has extensive experience in developing PHP and JavaScript custom scripts for the Google Maps API. For more information, please contact us.

The HTML5 video tag is intended to simplify playing videos across all browsers and platforms. However it is not yet fully supported by all the most popular browsers (e.g. IE, FF, Mobile Safari, Chrome, iPhone, iPad, BlackBerry, Droid). This means that some users may be able to view the video, but other users would not if they do not have the most current revision and the required plug-ins.

For the immediate future I would recommend the following:

1. Identify what browsers you want to support.

2. Detect the browser on the server with PHP.

3. Insert the best video player in the downloaded page for the browser (e.g. Flash when supported or the native player for iPhone or BlackBerry).

4. Stream the appropriate video file for the downloaded video player.

5. If necessary, video format conversion can be performed as required on the server. However, it is recommended to create a video upload script that will convert from a standard video format (such as Flash) to the other required video formats (such as h.264 for iPhone and BlackBerry) and then store the required formats (http://ffmpeg.org/index.html).

Various technical articles about the HTML5 video tag indicate that there is still a lot of work to be done before the HTML5 video tag is widely supported (http://theturninggate.net/tutorials/tutorial-ttg-stage-ce-html5-video/).

A demonstration of a JavaScript and PHP based solution that only requires one line of web page code is here. By updating the MySQL table, new media playback technologies are supported without changing the web page code.

Sunrise Resources LLC has extensive experience in designing browser specific video web applications for desktop and mobile platforms. For more information, please contact us.

Designing browser compatible HTML, CSS, and JavaScript typically requires a significant portion of a project schedule. Unfortunately the differences between browsers seem to be increasing especially in the area of video media players for both desktop and mobile applications.

A server-side language such as PHP can detect the client browser and then build the appropriate HTML, CSS, and JavaScript. Scripts for commonly used functions, such as video media players, can be stored in MySQL and inserted.

JavaScript support and design requirements vary significantly between desktop browsers, and vary even more between mobile browsers. A task as simple as starting a JavaScript function on page load may require different code for Internet Explorer (“IE”) and Firefox (“FF”) when using a Content Management System (“CMS”) such as Drupal or WordPress, since a CMS typically generates the “body onload=’javascript: do_something()’” tag when the page header is built and not when the page content is generated.

For example, in order to detect when a web page is fully loaded, FF allows a JavaScript “window.addEventListener” inside the “body” and “/body” tags which will detect page load. IE, however, uses “document.onreadystatechange”, which can be used to write a function to detect the existence of some condition or variable that will indicate if the page has been loaded.

Media players, such as Flash, BlackBerry, iPhone, and IPad, require different HTML and JavaScript for different desktop and mobile browsers. Building a library of verified scripts and CSS files which are inserted by PHP from a MySQL database, reduces development time and browser compatibility testing time significantly.

This methodology allows a clean separation of HTML web design and programming skills. A HTML and graphic web designer, for example, can insert a complex function with a single line of PHP code within HTML such as “insert_video_player()”, and the programmer can focus on functionality issues.

Not only does the HTML, CSS, and JavaScript often vary, but the format of the media served may also need to vary. In some cases, PHP may be used to create or convert media files on the fly.

In many applications it may be advantageous to use AJAX (asynchronous JavaScript and XML) to send and receive data without reloading the page. AJAX can be used to load browser specific data, which can also be retrieved from a MySQL database.

Designing browser compatible HTML, CSS, and JavaScript can be streamlined through the use of a server-side language such as PHP with a library of scripts in a database, and design responsibilities can be partitioned between HTML/graphics design and programming.

Sunrise Resources LLC has extensive experience in designing browser compatible HTML, CSS, and JavaScript using PHP and MySQL for mobile devices and desktop browsers. For more information, please contact us.

In order to support streaming video for mobile devices and desktop browsers, it is recommended to create a compatibility table that defines all supported mobile devices and desktop browsers, formats, screen sizes, and bit rates, and media players.

Different Blackberry models, for example, have different screen sizes. According to BlackBerry, the Tour 9630 screen size is 480×360 pixels and supports .mp4, .3pg, .3pg2, .avi, .asf, and .wmv formats. BlackBerry has its own media player, which embeds similar to other media players.

According to Apple, the iPhone screen size is 640×480 pixels and supports .m4v, .mp4, and .mov formats. The iPhone also has its own media player which embeds similar to other media players. The iPad architecture is based on the iPhone, and the iPad screen size is 1024×768 pixels.

When loading a web page with video, a server-side script in PHP can determine what HTML, media player, and JavaScript to load to support the connected mobile device or desktop browser. It is recommended to verify the proper operation on actual devices and desktop browsers with actual videos that will be used.

The web server may be able to convert videos on the fly if not all video format options have been created and stored in advance. Remember to upload the maximum supported screen size and bit rate if you plan to convert videos on the fly. In general, however, it may be advisable to write a server-side script to create and store all supported video versions when the video file is first uploaded to the server.

Sunrise Resources LLC has extensive experience in streaming web video for mobile devices and desktop browsers. For more information, please contact us.

Drupal provides administrative features such as “roles” and “permissions”, which can be used to control what content is delivered to what user. In a subscription site, various content options can be defined as “roles”, and users can be granted different “permissions”, such as editing.

In addition to “roles” and “permissions”, the Drupal variable “$user” can be used in server-side PHP code to make decisions regarding what a user can see or do. This provides enormous flexibility when designing a subscription site.

The standard Drupal MySQL tables can be supplemented with additional fields and new tables in order to support custom features. The open source PHP code can be modified and enhanced as desired. In general, if you can describe a feature in words, it can be implemented in Drupal with PHP, MySQL, and JavaScript.

Sunrise Resources LLC has extensive experience in the customization of Drupal, WordPress, and Joomla, and other open source CMS based sites. For more information, please contact us.

Studies have shown that potential web customers lose interest in as little as four seconds. If it takes longer than a few seconds to load a page, you may have already lost potential customers before the page loads.

Ads that come from servers other than your own can slow down your page load significantly. In some cases, even with a fast Internet connection, pages can take 30 seconds or more to load while waiting for various remote ad servers. By the time the page loads you may have lost most of your potential customers.

The recommended approach is to cache ads and to serve the entire page yourself, or at least control how the entire page is served. PHP or other server-side scripts can be written to pre-fetch ads and store them in high performance server caching systems such as Memcached. This allows you to optimize your web page loads and maximize your ad based revenues and also your product and service revenues.

Ads can be loaded and rotated via the JavaScript XMLHttpRequest() function without re-loading the web page. All ad clicks can be managed and tracked on your server using open source tools such as OpenX or custom PHP or server-side scripts.

When your page loads quickly your potential customers will see the ads in addition to your products and services, and your total revenue will increase. If your web pages contain content from remote servers that you have no control over, you are gambling with your success.

Sunrise Resources LLC has extensive experience in ad server implementation and performance enhancement. For more information, please contact us.

When building an eCommerce site that supports subscriptions or any other form of automatic re-billing, it is critical to protect your customers’ credit card and other personal data. Managing customer credit cards on your web server provides the highest level of flexibility, including the ability to use multiple credit card processing companies.

However, along with this flexibility comes a significant responsibility to protect the security of your customers’ financial data. An excellent source of reference material is the PCI Security Standards Council.

Web servers should be regularly backed up, including all databases. In practice, back-ups are often performed by scripts and people who are not familiar with the programming details of the site. For this reason, it is recommended to encrypt all customer financial data that is stored in a database to eliminate the possibility that sensitive data could ever be transferred over the Internet unencrypted. Without this precaution, a well intended hostmaster could unknowingly expose your customers’ financial data to the Internet.

Although requiring customer forms to be encrypted via https is a necessary step, it is not sufficient if the collected financial data is not carefully stored on the backend of your eCommerce application.
With very little overhead, a PHP or other server-side script can be employed to encrypt financial data as it is written into a database and to decrypt during reads.

Sunrise Resources LLC has extensive experience in writing custom PHP and MySQL scripts for database encryption and decryption. For more information, please contact us.

Any website that generates income, or is mission critical, should have a development site that is on a different physical server from the on-line site. Fedora 12 live image can be used to create a development site that runs on a local PC in order to insulate the on-line site from unexpected issues that can arise when developing server side code, installing new server software, or upgrading server software.

It it recommended that the on-line server be an exact clone of development site whenever possible. One method is to use two identical servers at an ISP and perform a recursive file copy from the development site to the on-line site after all quality checks have been performed. Another method is to build a local development server that is a near clone of the on-line server, at least with respect to the server-side major software components in a LAMP stack (i.e. Linux, Apache, MySQL, and PHP).

Fedora 12 live image provides a quick method to test Linux on a local PC without installing anything on the hard drive. The performance will be slower than a hard drive installation because Fedora 12 live image runs from either a CD-ROM or a USB drive.

By using a 2 GB or larger USB drive, you can customize the live image for a particular PC that may require drivers that are not provided on the Fedora 12 live image, since the Fedora 12 live image is about 700 MB in size. You can also store data on the USB drive. Please see How to create and use Live USB.

Once you verify that Linux runs on the development PC, you can then install it on the hard drive using the supplied command on the desktop.

The basic LAMP stack can be installed as described here.

In most cases, server-side software is upward compatible, but don’t rely on this general rule blindly. For example, when MySQL upgraded to v5.0.12, some JOIN syntax was changed to comply with the SQL:2003 standard, as described in Join Processing Changes in MySQL 5.0.12. So a development site should be used to verify software upgrades as well as server-side script changes or additions.

Sunrise Resources LLC has extensive experience in writing PHP scripts to recursively copy files and database tables from a development site to an on-line site using FTP or shell commands utilizing encryption to ensure the security of customer personal and financial data. For more information, please contact us.

Custom PHP functions, such as a shopping cart or the RSS news feed in the header above, can be added using PHP. The news feed in the header above is implemented using custom server-side PHP code to obtain and cache the RSS feed, which is retrieved and displayed in the WordPress header via AJAX (asynchronous JavaScript and XML) using the JavaScript XMLHttpRequest() function.

The PHP code below reads what browser you are using and your IP address:

Your browser is:

CCBot/1.0 (+http://www.commoncrawl.org/bot.html)

Your IP address is:

38.107.179.211

Sunrise Resources LLC has extensive experience in writing custom PHP and MySQL scripts for Content Management Systems such as WordPress, Drupal, and Joomla. For more information, please contact us.