Archive for December, 2009
Disadvantage of cURL Library PHP example
Sunday, December 20, 2009 22:35 No CommentsAlthough 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 [...]
How to design a Brochure !
Saturday, December 19, 2009 11:47 2 CommentsBrochures 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 [...]
Introduction to Search Engine Optimization
Friday, December 18, 2009 22:20 No CommentsSearch 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 [...]
How to read large files in PHP?
Friday, December 18, 2009 19:08 No CommentsWhen 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 [...]
What is the default table in MYSQL?
Wednesday, December 16, 2009 22:58 No CommentsWhat is the default table in MYSQL and which type of table is generatedby default.
MyISAM is the default storage engine.
How colors are used in a good web design !
Tuesday, December 15, 2009 22:32 No CommentsWeb 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 [...]
Auto loading of vendors or any other file in cakePHP
Saturday, December 12, 2009 23:22 No CommentsIn 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 [...]
Using PHP cURL to read and write RSS feed XML
Sunday, December 6, 2009 15:41 No CommentsSimple 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
Saturday, December 5, 2009 8:38 No CommentsLogos 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 [...]
What is maximum size of a database in MySQL?
Wednesday, December 2, 2009 17:52 No CommentsIf 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 [...]


