PHP posts

PHP Ad Tracker: Site Administration Ad Banner Data Form

If you have read any of the other posts in this series you know that we have done quite a bit with our PHP ad tracker. In this session, we will look at the HTML form that calls these actions. First, we create the HTML table that will hold the form header: <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><b>Developer Drive Advertisements Administration</b></td> </tr> Next, we specify the operation (add/edit/delete/deactivate) for this...

PHP Ad Tracker: Listing Ad Banners and Clients

In our last session, we finished writing the PHP class file that would control all the ad banner functions.  This week, we look at the presentation layer for the administration of these functions. The ads_list.php page lists the current banner ads.  First, we must include the class file so that the page can instantiate the class call the functions: <?php require_once("class.ads.php"); // instantiate ads class $oAds = new ads; Next, we fill the $aAds array with the data from the ads table and get...
CSS

Parallax Scrolling: An Introduction

Anyone who has played, watched friends play, or briefly saw video games that were released in the 80’s and 90’s is familiar with parallax scrolling. Think of games like Mario Bros, Streets of Rage, Kung Fu, Turtles in Time, or the original parallax scrolling game, Moon Patrol.  Parallax scrolling is when there are multiple layers of images all moving at different speeds, causing a 2D image to have a 3D-like effect. Why am I talking about retro video games on a web development site?  Well, the simple...
CSS

Develop, Deploy and Maintain in Coda

Coda by Panic bills itself to be "one-window web development." I have been a web developer (or at least playing with code) for the past six or seven years, and purchased Coda about a year ago. It took me almost this long to realize the beauty that lies within the code editor when you truly use it as a one-window web development system. Today, I'm going to walk you through setting up your next WordPress site so you can develop locally, deploy to your live server, and maintain the code base and providing site maintenance....

Pushing Updates to the Web Page with HTML5 Server-Sent Events

The HTML5 Server-Sent event model allows you to push realtime data updates from the server to the browser. In this tutorial we will work through the process, with the EventSource object handling received data and writing it to the page. We will use HTML5 and JavaScript at client side, with PHP at server side. With existing models such as AJAX, the code in a Web page would continually ask the server to supply new data, but the onus was on the client to request the information. With Server-Sent requests, you...

Embed Analytics Using the Google Analtyics API

Google Analtyics gives so much data that sometimes it becomes hard to digest. For larger sites it is easy to become so overwhelmed that you can't find the time to look up the analtyics for each page. Or maybe you have many editors for a site who don't have access to your Google Analtyics account and you want to provide them with data so they can see how well their pages are performing. With the Google Analytics API we can easily display some basic analytics right in each page.  Google offers many libraries...

PHP Ad Tracker: Reports and Records

In the previous lesson, we examined the basic functions of our banner ad tracking system, including the retrieval of records for both banner ads and advertisers. In this lesson, we will look at the functions responsible for generating reports and manipulating the data in the ads table and advertiser table. The getClientsList() function retrieves active client records and sorts them alphabetically by client name: function getClientsList() { // get clients from db $sql = "SELECT ad_client_id,...

PHP Ad Tracker Part IV: Displaying and Linking Ads

In our last session, we looked at the process of entering information on ad banners and ad clients, as well as generating ad activity reports. This week, we examine how to retrieve a random banner ad. We will also learn how to delete, activate and deactivate ads and clients. The getRandomAd() function retrieves a random ad by using the PHP rand() function. The function returns the ad’s primary key ID, client ID, title, URL and redirect path. The function also updates the activity table for this banner...
Load more
Home CSS Deals DesignBombs HTML HTML5 JavaScript jQuery Miscellaneous Mobile MySQL News PHP Resources Security Snippet Tools Tutorial Web Development Web Services WordPress