Web Development & Programming Resources

 

The following are Web Development & Programming Resources, including tips to improve the performance of your website, how to log the actions of users to a database and many free scripts written in Php, VBScript and VBA.

Page 1 | Page 2

Php: Log clicks on links to external sites

Log users clicks/actions before they are taken to the desired address. Php code uses a MySQL database and the PEAR MDB2 package to connect. If you need to keep track of clicks on links to external websites, the Php script provided in the article can be used to log the details of the link to a table in a MySQL database. This data can the be used to determine which external links on your site are most popular. The script takes the ID of an item from a MySQL database table, which is then used to retrieve the information (url) for the link which a user clicked on. The 'hit' is logged to the database table with the ID of the item which was clicked on, along with the date and time of the click.

View Full Article Related: Php Click Tracking

Optimizing a Website for Performance

Tips for improving website performance by reducing the number of DNS requests, caching data from external sources, and completing processing that takes a long time to complete as background processes or Cron Jobs.

If RSS feeds are displayed as html on a webpage, you should consider storing the data from the feeds in a database table, which is updated by a background script or Cron Job. Pages on the website can then retrieve all information from the database, reducing or eliminating the need for additional DNS requests when loading the page.

View Full Article Related: Improve Website Performance

Parse / Read XML file using php

Php code to load and process an xml file. Each element name and value, including all attribute names and values are displayed in the browser.
This can be used as a starting point for loading an xml file and accessing elements and attributes. This can be used as a reference to help when writing a Php script that parses and XML file from a file or web address. As the XML file is parsed, the name of each element in the XML file is displayed, along with the value and any attributes (including values) that the element may have. Sample code is provided in the article.

View Full Article Related: Parsing XML using PHP

Call VBA class Module in Outlook from a custom form using VBScript

Microsoft Outlook: VBScript - Calling VBA Class Module function

This article describes how to call a VBA Class Module function from VBScript. An example of where this may be used is to call a function from a module or macro (VBA) using code in an Outlook form (VBScript). The example code provided in the article creates an "Outlook.Application" object, which is then used to call the function within a module in Outlook.

View Full Article Related: Writing VBA Code for Microsoft Outlook

Free Php RSS 2.0 feed generator class (RSS2Writer)

A free Php script to generate RSS feed XML. A Php RSS2Writer class file is provided which contains functions required to generate an RSS 2.0 feed which can include a Title, Description and feed items which also have a selection of optional paramaters such as the date/time the feed content was last updated and categories/tags for each item. A sample controller is provided which includes some instructions for using the Php RSS 2 Writer.

View Full Article Related: Php RSS 2 Writer Class

VBScript String Clean function - remove or replace illegal characters

This article provides a function written in VBScript which removes illegal characters from a string. The illegal characters are specified in an array at the beginning of the function. The function is passed the string which may contain illegal characters, which then processes the string to remove or replace any illegal characters. The code also allows you to specify the character or word which will replace specific illegal characters. The illegal characters provided in the function are included for processing strings which will become the filename of a document or list item in SharePoint, which has a number of characters which are not accepted.

View Full Article Related: Types of String Manipulation Methods in Visual Basic

Free online webmaster, web development and web design tools and resources

Tools and resources for Webmasters, web development and programming tools and resources, web and graphic design tools and resources to help when designing and developing websites.

View Full Article Related: Webmaster, Developer, Designer, SEO & SharePoint Resources

IE / Firefox Alignment Issues Solved

Having trouble getting IE and Firefox to display a website the same? This article describes how to set the alignment of elements on a webpage so that both Internet Explorer/IE and Firefox will display the element centered.

View Full Article Related: Horizontal alignment, HTML, CSS, standards, your browser - and you html page alignment issues

Php: Manage session times using code - Expiration / Timeout script

This php script can be used to manage session times for users on a website. Each time a page is loaded that requires a session timeout, this script is included that checks if the last action by the current user was over a specified number of seconds, which would indicate that the session has expired. If the session has not expired, a variable is updated with the current date/time, which will be used to calculate the time in between requests from the user. When the amount of time between the last request and the current time is greater than the maximum session length, the session is expired.

The script is included in any page that requires a time-out for security purposes, and checks how long since the last page request by the user. If the length is greater than the specified amount (in seconds), the session is expired. If the amount of time between requests ('last_action' and the current time) is less than the maximum session length, the session is refreshed by updating the 'last_action' (or similar) session variable.

View Full Article Related: Validating PHP User Sessions
Page 1 | Page 2