Hello! My name is Chris (aka KreCi). I am an independent developer making living from web & mobile application development, website flipping, freelancing & stock photography. Believe me it is my best job ever! Read more...
Web & Android Development, Stock Photography & My Income Online
Here is a demo of my url shortening script. It let your visitors to make short redirections of their very long url’s (for example it is useful for twitter users where they are limited to 140 characters). Script is made to be as simple as possible. HTML is separated from PHP so it may be customized by editing one HTML file without touching any PHP code! It do not need MySQL database – all data is stored in the file system. Users are redirected by .htaccess file to desired shortcut. Additionally there is administrator backend module to manage (edit/add/delete) url shortcuts. Below you may click for demo installed on my dev server.
You may get a copy of this script for $30 (installation included) – contact me if interested.
Update: Free version of this script have been released. Click here for more details.
It was boring to look for it in PROFTPD docs – but I could not found quick FAQ so I had no choice. Anyway I decided to write it for others who need quick tip. Here is just 4 simple steps.
Continue reading…
Today I have had to modify very complex script to change look of html form. It is quite easy to make changes in the form. But sometimes it is a problem to modify not to well written PHP script to receive data from new form.
Continue reading…
If error reporting is disabled by default on your host you have two solutions.
First is to add to your PHP script this little piece of code:
<?php error_reporting(E_ALL); ini_set("display_errors", 1); // the rest of your script... ?>
Additionally it is very useful to enable E_STRICT reporting level as well (not included in E_ALL). E_STRICT run-time notices, enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code. To turn it on your code should look like this:
<?php error_reporting(E_ALL | E_STRICT); ini_set("display_errors", 1); // the rest of your script... ?>
But putting this code on the top of your script will not catch any parse errors. A missing “)” or “;” will still lead to a blank page. This is because the entire script is parsed before any of it is executed. If you are unable to change php.ini (that would be the best solution) and set in it
display_errors On
then there is a possible workaround (found on comments on php.net website). This code would solve this problem:
<?php error_reporting(E_ALL | E_STRICT); ini_set("display_errors", 1); include("file_with_errors.php"); ?>
You may go even further and make a little debug script with error reporting (when it is disabled for the rest of your scripts). Just create a file called “debug.php” with this content:
<?php error_reporting(E_ALL | E_STRICT); ini_set("display_errors", 1); include($_GET["file"]); ?>
Then you will be able to execute any script on your web host just by calling “debug.php” with urls like this
http://domain.com/folder/debug.php?file=file_with_errors.php
http://domain.com/folder/debug.php?file=subfolder/file_with_errors.php
http://domain.com/folder/debug.php?file=../file_with_errors.php
Second alternative soulution is to edit your .htaccess file. It would enable error reporting for all files in current directory. All you need to do is to simply add the following lines:
php_value display_errors 1
php_value display_startup_errors 1
Very simple to use PayPal shopping cart. It may be customized by CSS sheet to your needs. You can use any currency supported by PayPal and define any type of products or services to sell. There are two types of groups for selling items – with radio button (client can choose only one option from group) or with checkboxes (client can choose many options from the group). Number of groups in cart is unlimited! All orders details are available thru admin. Additionaly descriptions over and under shopping cart may be customized with simple templates. Script is written in pure PHP and data is stored in MySQL database.
Demo shows example of using this cart for ordering “Wedding photographer”. If it doesn’t, probably someone have already been testing it… Anyway database resets every 24h so I am not going to change this description…
If you want you may test it by clicking links below.
You may get a copy of this script for $30 (installation included) – contact me if interested.
Calendar with possibility to mark if resources for some date are free or not. There are 3 options: “Reserved”, “Occupied”, “Free”. Calendar is generated by the script and it let users to go through years back and forward. Calendar days are displayed regarding the real dates (feb 29!). Administrator can mark dates just by clicking on one of the calendar cell’s. Script is written in PHP (with MySQL) and JavaScript.
You may get a copy of this script for $30 (installation included) – contact me if interested.
Update: Script have been released under GPL license and can be downloaded for free. Click here for more details.
Here is a simple ajax based user management backend written in PHP (with xajax libary). User data is stored in MySQL database. It is just a module that may be customized and used to any new script. Don’t be afraid to test as database resets every 24h.