Development
PostgreSQL: Create Recordset & Display | |||||
| Post Date: | Jan 25, 2010 | Posted By: | Admin | Category: | PHP |
|---|---|---|---|---|---|
Creating a recordset and displaying data from a PostgreSQL table using PHP; | |||||
PHP CLI: Virtual Box Startup Script | |||||
| Post Date: | Nov 11, 2009 | Posted By: | Admin | Category: | PHP |
Administrators are often called upon to write scripts to accomplish tasks. I've been playing a lot with php cli scripting lately and had a need to create a script to startup a VirtualBox VM from the command line. Here's what it looks like; | |||||
HTTP Server Response Codes | |||||
| Post Date: | Jun 21, 2009 | Posted By: | Admin | Category: | General |
HTTP response codes; | |||||
Joomla! 1.5.x: !JoComment - Remove "Powered By..." | |||||
| Post Date: | Jun 05, 2009 | Posted By: | Admin | Category: | Joomla! |
Not that I can blame developers for wanting to do a little advertising in their Open Source creations distributed under the GNU Public license, but it can be bit troublesome. I have 3 sites where I've installed !JoComment 4.0 alpha3 by Compojoom.com. All three sites started to receive hits for the phrase "Powered by !JoComment". That's not exactly one of the terms I was hoping to get ranked in the search engines. Needless to say, I started looking for ways to remove it. | |||||
PHP CLI: Simple Process Control In Linux With PCNTL_EXEC | |||||
| Post Date: | May 15, 2009 | Posted By: | Admin | Category: | PHP |
I've been working on a project using php executed from the command line. The project downloads files via FTP from several sources, renames the files and tosses the files into a new directory structure. I never thought I'd find a legitmate reason to create a "file scrounger". Throughout development I've been executing the script from the command line to test and debug. Happily building the app step by step. Once it was complete I thought I'd just be able to execute it from a cron job on my Linux box and be done with it. Boy, was I wrong!!! | |||||
WordPress: Remove Logo On Login Form | |||||
| Post Date: | Mar 21, 2009 | Posted By: | Admin | Category: | WordPress |
Everyone wants to customize their website or tweak things to conform to the way they want it to look. WordPress is a great product, but I think it confuses people when they click the login link and get a page that screams WORDPRESS. Frankly, I'd rather that bit of confusion didn't exists. This issue has always been an objection of mine to the WordPress login page. There was a time when that big 'ol logo linked back to WordPress too. That made things real confusing for site visitors. I'm glad they've atleast change that to link to your WordPress blog instead. | |||||
Javascript: Cookies | |||||
| Post Date: | Mar 20, 2009 | Posted By: | Admin | Category: | Javascript |
Web development, sooner or later, requires dealing with cookies. I've found using Javascript to handle cookies preferable over using php. Reason; "Header already sent" errors. Generally reading a cookie is not a problem in php and requires less code. Here's some code I've gathered and modified for my own use for cookie manipulation; | |||||
Joomla!: Pass Session Data To A Wrapper | |||||
| Post Date: | Feb 23, 2009 | Posted By: | Admin | Category: | Joomla! |
{php} $sid=session_id(); $sname=session_name(); setcookie("sessid",$sid); setcookie("sessname",$sname);{/php} This information requires Joomla (1.5.x series) Global Configuration/System/Session Handler to be set to "database" and plugin "includePHP installed for the following information to be valid. Current and active user sessions are stored in a cookie on the user local drive. The cookies are domain related (i.e.; when you lookup a cookie on your local system it's stored by the site name then cookie name). The following functions provide access to the Joomla cookie created during log-in; | |||||
Joomla!: DHTML Menus Behind Flash | |||||
| Post Date: | Jan 07, 2009 | Posted By: | Admin | Category: | Joomla! |
Another round with Joomla! and it's great environment. I recently installed an extended menu system at NASCAR This Week's website. The site contains some flash elements like menus and videos. The top menu consists of drop-down items now and those items were disappearing behind the flash items on the pages. I've seen a lot of sites out there that display this problem. I always thought it looked hideous and wondered why that developer left it looking like crap. I still don't know why a web developer would leave a menu system in that condition, but I did find the solution. | |||||
PHP: Word Popularity/Density Script | |||||
| Post Date: | Dec 10, 2008 | Posted By: | Admin | Category: | PHP |
I found this at Bit Repository. Decided to add it here for posterity. Function: | |||||
Joomla 1.5.x: Reset Superuser Password | |||||
| Post Date: | Sep 09, 2008 | Posted By: | Admin | Category: | Joomla! |
I found this at Contract Web Development and didn't want to let it go... | |||||
PHP: Display Column (Field) Names In MySQL Database Table | |||||
| Post Date: | Jul 14, 2008 | Posted By: | Admin | Category: | PHP |
On occassion we need to get the column names in a table. The following code snippet shows how to connect to the database and display all the column names in the database table. | |||||
HTML: Dress Right - Go Bottomless | |||||
| Post Date: | Jun 29, 2008 | Posted By: | Admin | Category: | HTML |
Have you ever noticed, while using a style sheet or other method of absolute positioning in HTML, that position 0,0 is the upper left corner? All references to establish width and height assume the page has no predefined right side or bottom. HTML is in fact designed not to have a right border or page bottom. This becomes a primary consideration for web design. Why worry? | |||||
HTML: Basic Fonts | |||||
| Post Date: | Jun 16, 2008 | Posted By: | Admin | Category: | HTML |
A web designer, among other things, needs to select a font that can be viewed by nearly all OS's and browsers. Why? Well, fonts are not pushed over the internet with the HTML pages. Rather, the browser relies on locally installed fonts (those installed on the browsing machine) to render the text. If the font is not installed when the browser connects, the browser uses a "default" font installed on the users machine and specified by a setting in the browser. As a web developer, you can use a fancy font in html/css and hope users have it installed. Or use fonts that are provided generically with most operating systems. So, what are the basic fonts for use with html/css? Here's a nifty table for reference, grouped by font family. | |||||
PHP: Send 404 Error Header | |||||
| Post Date: | Jun 06, 2008 | Posted By: | Admin | Category: | PHP |
To return the proper header information in a file used as a 404 error page, enter the following line at the beginning of the document (Yes, before <!DOCTYPE> and <html> tags); | |||||
Joomla! 1.5.x: Change/Remove Meta Generator Tag | |||||
| Post Date: | Jun 06, 2008 | Posted By: | Admin | Category: | Joomla! |
Many, including myself, do not want the meta generator tag to expose the fact we're using Joomla! as a basis for our web site(s). It's not that we're embarrassed using Joomla!, it's a question of whether it's appropriate in a given environment. Two obvious options exist, change it or remove it; | |||||
PERL: Test HTTP Response | |||||
| Post Date: | May 04, 2008 | Posted By: | Admin | Category: | PERL |
I'm not exceedingly fond of perl scripting, but this one is useful for testing the time it takes to download a web page from a site. As there is no cache system employed it provides a raw time to download the specified page and produces the results in terms of seconds. | |||||
Force File Download | |||||
| Post Date: | Apr 07, 2008 | Posted By: | Admin | Category: | PHP |
Ever need to have a visitor download a file? You could just put it into a link like Download. But what if you want to have the user download an image? That can get a little dicey. The user's browser settings can get in the way, opening the image in another browser window or a local image viewer. Hence the need to create a script to provide a clean download mechanism. The following script offers this ability for various file types; | |||||
Javascript: Simple Message Box | |||||
| Post Date: | Apr 03, 2008 | Posted By: | Admin | Category: | Javascript |
I'm always looking for the easy way to implement code. Here's a real easy way to produce a message box on a web page; | |||||
Javascript: Return To Previous Page | |||||
| Post Date: | Apr 03, 2008 | Posted By: | Admin | Category: | Javascript |
Really simple code to return a user to the previous page in a browser. | |||||
Simple Math Challenge/Response In PHP | |||||
| Post Date: | Apr 02, 2008 | Posted By: | Admin | Category: | PHP |
I needed a captcha type thing for a website I was building. So off to the 'net I went to research available scripts. Everything I read, that appeared objective, indicated that captcha is a weak way to protect pages. Further, one of the articles suggested using math as a challenge/response scheme. Mathematics is the universal language, right? After working with several captcha scripts and not being successful at making them work within the environment I was trying to implement, I generated the following; | |||||
| ( Page 1 of 1 ) ( Records: 1 - 21 of 21 ) |
