• Home
  • Services
  • Profile
  • Portfolio
  • Contact
  • Links
  • Blog
  • Archives
  • Sitemap
Subscribe: Posts | Comments | E-mail
  • Ajax XMLHttpRequestAsynchronous HTTP Request How To's
  • FreebiesBest Freebies Collection
  • MiscellaneousNews, Announcements & General Stuffs
  • Print & Web DesignPhotoshop, Vector, CSS, XHTML
  • ProgrammingProgramming PHP, ASP, .NET and more

Bali Web Design

Posts Tagged ‘PHP’



Posted on August 18, 2010 - by webmaster

PHP Newbie: Proper handling of Error & Exception in PHP

Got a question from a friend today who is actually a great desktop programmer and just learn PHP since he believe that the future is in the web (hope you’re right dude). He asked me about how to handling error in PHP. Well i’ll write my answer here so can share with others and got feedback when I was wrong.

In PHP there are few options that you can use to handle errors & exceptions during script executions and as developer you must considering not the easiet but the most flexible approach which will help you when debugging your appllication, the more detail error message provided the faster you can fix it. Flexible means its easy for you to change the application behaviour when unexpected things happened during execution like: display error, logging error or even automatically notice you via email.

(more…)


Posted on June 27, 2010 - by webmaster

Install, Configure & Running Memcache in Windows as Service

Installing memcache server in windows is a little bit complicated compared to how it can be done in *nix since theres not yet available ready to use package for win32.

Luckily i found the compiled memcached for win32 (exe) which was made by jellycan, within this exe file you can install configure and running memcached as a service in your windows environment, here are how i made it:

*** updated ****
Newer version available at northscale, thanks to Matt Ingenthron for pointing this.

(more…)


Posted on June 6, 2010 - by webmaster

Upgrading to upcoming CodeIgniter 2.0

phil sturgeon has published a new article in his blog about upgrading pyroCMS to the new upcoming codeigniter 2.0, worth to look at to help you port your CI based application to run with CodeIgniter 2.0 with less headbanging. I seen big changes has been made to this new version includes:
(more…)


Posted on September 24, 2009 - by webmaster

PHP Class Create Short URL via TinyURL, Is.gd, Hex.io, Tr.im & Bit.ly API

Short URL is commonly used today for several reasons: avoid url garbling, take smallest space especially for long url which need to be posted at limited space format eg: twitter, also often used to manipulate user for specific purposes eg: hiding orginal url for phising and ads/affiliation links.

There are many websites that provide shortening url services, tinyurl, bit.ly, hex.io are some of them, below is simple PHP script as an implementation to use their API, create short url on the fly, currently support: tinyURL, bit.ly, is.gd, tr.im and hex.io, but you can easily add other providers.

(more…)


Posted on February 7, 2009 - by webmaster

PHP Currency Converter via Yahoo Finance

I have posted sample of PHP script to do rate conversion based on Google Finance rates, now this is the same PHP functionality but based on Yahoo Finance rates.

(more…)


Posted on February 6, 2009 - by webmaster

PHP Currency Converter via Google Finance

Today i am working on a site which need a currency converter, first thing that come up in my mind is google widget, but then i stuck in customizing it to match the design and i decided to fetch it manually, and here is the PHP codes:
(more…)


Posted on September 7, 2008 - by webmaster

Use custom fonts, PHP, DOM & Javascript Image Replacements

facelift image replacement

Using custom fonts sometimes can give a different “soul” to the web page, but as a good web designer we shouldnt fully strict to the “looks & feels” but also the accessibility, cross compatibility, always try to make it present almost in the same way across different screen readers, browsers, and media. now days we also need to consider of SEO, and use image directly to the page to replace the important phrases is not a best practice.

(more…)


Posted on September 5, 2008 - by webmaster

pChart an opensource PHP GD charting framework

pchart php chart class

pChart is an opensource PHP chart framework, it is provides ability to render a chart using PHP + GD Library easily. It also comes with pCache which enables caching the data and save the load of server, released under GNU GPL license.


Posted on August 17, 2008 - by webmaster

PHP ajax login form using Jquery

ajax stuffs

Because a lot of responses to the previous post php ajax tutorial create ajax based login form using jquery, and asking about some bug fixxing incl IE bugs, i decide to create a new PHP ajax login functionality using Jquery, and here it is…

Whats new?

  • Completely recoded
  • Tested in IE6, FF3, Opera9 and i think should be worked in other modern browsers as well
  • Easliy switch the data source between database and PHP array
  • Login authentication can be using username or email, or even both of ‘em by changing the config
  • Automattic redirection could be done within the javascript config
  • Redirect target (on success) can be changed in config file
  • Message and Text controled by array variable which could be changed in 1 file

(more…)


Posted on August 16, 2008 - by webmaster

Is there a secret behind file encoding in PHP?

Today i faced a strange warning message when executing a PHP file,

Warning: session_start() [function.session-start]:
		 Cannot send session cache limiter - headers already sent
		 (output started at file.php:1) in
		 file.php on line 15

Well not the error message, but the reason that produce this message, i have tried to use different solutions to avoid this error:

  • Put the session_start() command in the very first line
  • Explicit set of session_save_path
  • Change the permission (CHMOD 777)
  • Reset the php.ini session auto start + Explicit set on the codes

but none of ‘em fix the error. Then i try to use unusual test, changing the file encoding from UTF-8 (i always save my file in UTF-8 encoding) to ANSI, and Booom! the error message gone :) .

Didnt really know how the file encoding can cause this error, because i always use UTF-8 and produce the same code and never get this error. Is there any secret of file encoding on PHP?, now you tell me :) , because within ANSI i could not produce foregin characters, so i need a better solutions, to kiss this error away and keep the UTF-8 encoding.

Any suggestions guys?


« Older Entries
Ad

  • Most Popular Posts

    • { 108 } ResponsesPHP ajax login form using Jquery
    • { 79 } Responsesphp ajax tutorial create ajax based login form using jquery
    • { 71 } ResponsesASP Classic Programming Still Alive
    • { 53 } Responses63+ best practice to optimize PHP code performances
    • { 44 } ResponsesVideobox: Lightbox for videos
  • Latest Posts

    • PHP Newbie: Proper handling of Error & Exception in PHP
    • Why SEO lost importance
    • jQuery Mobile Announced : Touch-Optimized Web Framework for Smartphones & Tablets
    • Multiple Google Account Signin
    • Install, Configure & Running Memcache in Windows as Service
    • DynamicWP Image Cube Wordpress Plugin
    • New Wordpress 3.0 API menu_page_url
    • Wordpress 3.0 Custom Taxonomy
    • JQuery DataGrid Plugin Compass
    • Upgrading to upcoming CodeIgniter 2.0
  • Categories

    • advertorial
    • Ajax XMLHttpRequest
    • Featured
    • Freebies
    • Miscellaneous
    • Print & Web Design
    • Programming
    • Tutorials
    • Web 2.0
  • Featured News

    • PHP Newbie: Proper handling of Error & Exception in PHP by webmaster on August 18, 2010
    • Why SEO lost importance by webmaster on August 16, 2010
    • jQuery Mobile Announced : Touch-Optimized Web Framework for Smartphones & Tablets by webmaster on August 16, 2010
    • Install, Configure & Running Memcache in Windows as Service by webmaster on June 27, 2010
    • Website Optimization Best Practices, speed up your website load by ruby on May 21, 2009
  • Tag Cloud

    • Actionscript advertorial Ajax XMLHttpRequest API best practices CakePHP chat Classic ASP CMS CSS Development facebook firefox Flash flickr Freebies gmail HTML icons Javascript Jobs jQuery jQuery Plugins Library Lightbox memcache Mootools news Personal PHP PHP Frameworks plurk Print & Web Design prism Prototype regex regular expression Scriptaculous SEO Tutorial twitter Web 2.0 Wordpress Works YUI
  • Archives

    • August 2010
    • June 2010
    • May 2010
    • September 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
copyleft 2007 - 2010 Bali Website Design Studio