Debugging php code or php web application is not as easy as debugging asp.net web application using Visual Studio.Net. But still, we can. From my previous article, “See How PHP Web Application Work With XDebug“, you can debug and profiling a whole php code running or part of your php code using XDebug. Or use the old method with var_dump(), die(), echo, and print_r(). And debugging is not an easy job for most developer.As i state in the previous post, we can still do debuggin with Zend … Read more...
See How PHP Web Application Work With XDebug
The most common issue when we are developing web application using PHP is debugger. Debugging our web application is very important when we are developing and testing our project. Usually i’m using var_dump(), print_r() or echo to show the output of the variable or the result. The alternative is using Zend Studio, the PHP IDE (Integrated Development Environment), but it is too expensive and i couldn’t afford it now.So the alternatively to see how your web application works is using … Read more...
URL Validation Class In PHP
A couple days ago i’ve been struggling with URL validation in PHP. And i found a URL validation class from phpclasses.org which i think is great and do what i need. And to use it, is really simple. Beside validate url, this class also can parse the url, so you can get all the url details.This url validation class is develop by Kaloyan Kirilov Tzvetkov, all credits is goes to him.Here is the example to use it:It’s pretty handy and safe your headache, isn’t it?Download … Read more...
Turn Off Light Feature For Video Streaming Site
Most of the times when you watching a streaming video from Youtube or other else, you found that all the comment or related videos or ads are little bit distracting. So if you own a video streaming website, it’s better if you can give this turn off light feature, so your visitor can enjoy their time when watching a video from your site.To implement this turn off light feature, you need JQuery to modify CSS on the fly.For JQuery library i’m using Ajax from Google API:And for … Read more...
Get Last Tweet Without OAuth Using PHP
Get last tweet of your tweets or someone’s tweet with username doesn’t need OAuth. Twitter have their own API to get last tweet with username. You can access the API with http://api.twitter.com/1/statuses/user_timeline/, which some arguments supplied. You can read more detail about this API function here.I have create a simple function to parse last tweet from a username:How to use it:The function will return array of tweets. That’s it, if you like to know more, you can … Read more...
Get Twitter Update With JQuery
From the previous article i write, Get Last Tweet Without OAuth Using PHP, and now i want to share with you how to get the twitter update with JQuery.Get Twitter update with JQuery is not much different, we are using the same API given by Twitter , process it and display the results. You can get the Twitter update from someone using their username using this Twitter API:Where username would be the twitter username, and format could be json, xml, atom and rss.Okay as usual, if we … Read more...
Enable Maintenance Mode With .htaccess
Sometimes when you are upgrading your blog or your website, it’s wise and highly recommended that your block all your visitor and redirect it to maintenance page. So your visitors know and come back later. You can redirect your visitors to maintenance page with redirect 307 (temporary redirect). This redirect 307 won’t harm your server and SEO in search engine. When Google bot saw this redirect code, it will come back later and index your page again.To redirect all your visitors except … Read more...
Learning JQuery For First Time
jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. It’s the definition from the author of JQuery. And JQuery also a cross browser javascript library, which means write once and run in every browser.There are a lot of other AJAX frameworks out there, such as Prototype, Mootools, Ext library, Google Webtoolkit … Read more...
Use And Tweak timthumb Script For WordPress Blog
Update: I don't use Timthumb script anymore because it has security vulnerability. So please use it with your own risk.TimThumb is a small open source library which is aimed to provide resized copies of given images. TimThumb is developed by Ben Gillbanks which is firstly create this script for the WordPress themes Mimbo Pro. It handles cropping, zooming and resizing web images in several formats such as jpg, png, and gif. It’s very useful and simple enough.Follow the guide below to … Read more...
Bring Your WordPress Blog To Local Server For Testing Environment
As a WordPress bloggers, plugin developers or themes designers you should have a local server for a testing environment. In Ubuntu you can easily install apache and mysql as it is bundled in default installation cd. And in Windows you can use XAMPP as a handy web server (you can refer to my previous post Local Server For Testing Environment With XAMPP On Windows for more details). And you can use XAMPP for Mac as well. But the point is you need a local server environment to designing, developing … Read more...