Archive for December, 2009

Although it has been noted that cURL outperforms both file_get_contents and fopen when it comes to getting a file over a HTTP link, the disadvantage of cURL is that it has no way of only reading a part of a page at a time. For example, the following code is likely to generate a memory limit error: <?php $ch = curl_init("http://www.example.com/reallybigfile.tar.gz"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, …

How to design a Brochure !

 on December 19, 2009

Brochures are useful promotion tools today. This business device seldom lost its effectiveness in bringing success to different companies or firms. The brochure tells the potential customer not only about your company through the content but also how you regard yourself in terms of professional design and print. This business material can provide adequate support in making sure that your promotion and promotion …

Search Engine Optimization (SEO) is the process of optimizing your website with the goal of increasing your search engine ranking and finally your traffic and sales. It involves researching your keywords to find good words for your website, aiming these keyword phrases strategically on your website and so improving your ranking by increasing the number of backlinks to your website.

How to read large files in PHP?

 on December 18, 2009

When working with VERY large files, php tends to fall over sideways and die. Here is a neat way to pull chunks out of a file very fast and won’t stop in mid line, but rater at end of last known line. It pulled a 30+ million line 900meg file through in ~ 24 seconds. NOTE: $buf just hold current chunk of data …

What is the default table in MYSQL and which type of table is generatedby default. MyISAM is the default storage engine.

Web design is not an easy job. There’s a lot of things which they must keep in mind while generating an stunning web-site. Color is two of the most important but least understood elements of web design today. It can bring life to any picture, text or graphics. It can generate the atmosphere needed in order to capture the viewer’s decision and loyalty. …

In CakePHP a good place for this function is app/config/bootstrap.php. The function to auto-load vendor files looks like: function __autoload($className) { App::import(‘Vendor’, $className); } If you want to use a custom function or a method of a class, you simply have to register your auto-load implementation. The example from above realized with a static method looks like: class AutoLoader { public static function …

Simple Example to read RSS feed and write in you local system. <?php $ch = curl_init("http://feeds.feedburner.com/imjan"); // Change the RSS FEED URL $fp = fopen("file.txt", "w"); // Change Filename if you want curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); ?>

Designing of an Attractive Logo

 on December 5, 2009

Logos are the symbols of your businesses and you display them more often and in more places. A logo is actually a visual icon that provides a unique identification element to a business or product. Logos are crucial to everyone, but in order to have a logo design that works magically, you must understand qualities of a lovely logo design. Effective Logo is …

If the operating system or filesystem places a limit on the number of files in a directory, MySQL is bound by that constraint.The efficiency of the operating system in handling large numbers of files in a directory can place a practical limit on the number of tables in a database. If the time required to open a file in the directory increases significantly …