Archive for June, 2009

Example: Download Website / Webpage Trough CURL PHP

Wednesday, June 24, 2009 15:23 No Comments

You can access / display any webpage through the following code:

<?php
echo DownloadUrl(‘http://www.imjan.com’); // Type Website URL to download

function DownloadUrl($Url){

// is curl installed?
if (!function_exists(‘curl_init’)){
die(‘CURL is not installed!’);
}

// create a new curl resource
$ch = curl_init();

/*
Here you find more options for curl:

http://www.php.net/curl_setopt

*/

// set URL to download
curl_setopt($ch, CURLOPT_URL, $Url);

// set referer:
curl_setopt($ch, CURLOPT_REFERER, "http://www.google.com/");

// user agent:
curl_setopt($ch, CURLOPT_USERAGENT, "MozillaXYZ/1.0");

// remove header? [...]

This was posted under category: CURL PHP Examples, PHP Interview Questions

How to increase organic traffic at your website?

Saturday, June 20, 2009 11:31 3 Comments

Organic traffic gives you real user plus more business for any niche. There are several ways to choose the best keywords for your website to increase your organic traffic of your website. If you follow the following steps you can get more traffic than any other website.
* Be specific with niche and find your main [...]

This was posted under category: SEO Tips

Order by vs GROUP By

Monday, June 15, 2009 6:16 1 Comment

The easiest explanation is that order by is doing the sorting of a table and the group by clause is used for aggregation of a field.

This was posted under category: MySql Interview Questions

The CHAR and VARCHAR Types

Monday, June 15, 2009 6:09 No Comments

he CHAR and VARCHAR types are similar, but differ in the way they are stored and retrieved. As of MySQL 5.0.3, they also differ in maximum length and in whether trailing spaces are retained.
The CHAR and VARCHAR types are declared with a length that indicates the maximum number of characters you want to store. For [...]

This was posted under category: MySql Interview Questions

what is the main difference between myisam and innodb?

Monday, June 15, 2009 5:34 No Comments

both myisam and innodb are storange enginein sql.
innodb support transaction, foreign key while myisam not
support transaction.
Other differences are :

1. innodb requires more RAM than mysiam
2. myisam relies on OS for caching while innodb caches with
in the engine itself.

3. Most preffered is innodb because

- Transaction safe
-It has commit, rollback, and crash recovery capabailities
- Innodb is [...]

This was posted under category: MySql Interview Questions

Stored programs include these objects

Monday, June 15, 2009 5:22 No Comments

Stored routines, that is, stored procedures and functions. A stored function is used much like a built-in function. you invoke it in an expression and it returns a value during expression [...]

This was posted under category: MySql Interview Questions

Defining Stored Programs (Stored routines, Triggers, Events)

Monday, June 15, 2009 5:20 No Comments

Each stored program contains a body that consists of an SQL statement. This statement may be a compound statement made up of several statements separated by semicolon (;) characters. For example, the following stored procedure has a body made up of a BEGIN … END block that contains a SET statement and a REPEAT [...]

This was posted under category: MySql Interview Questions

Using Stored Routines (Procedures and Functions)

Monday, June 15, 2009 5:18 No Comments

Stored routines (procedures and functions) are supported in MySQL 5.1. A stored routine is a set of SQL statements that can be stored in the server. Once this has been done, clients don’t need to keep reissuing the individual statements but can refer to the stored routine instead.
Stored routines require the proc table in the [...]

This was posted under category: MySql Interview Questions

which version of mysql can’t support stored procedure??

Monday, June 15, 2009 5:14 No Comments

Earlier versions (before 5.0)

This was posted under category: MySql Interview Questions

mysql 4.0 vs MySQL 5.0 (stored procedures, triggers, views, information_schema)

Monday, June 15, 2009 5:08 1 Comment

MySQL 5.0 New Features: Stored Procedures (By Peter Gulutzan)
Introduction
This 67 page guide is for long-time MySQL users who want to know “what’s new” in version 5. The short answer is “stored procedures, triggers, views, information_schema”. The long answer is the MySQL 5.0 New Features series, and this book is the first in the series.
What I’m [...]

This was posted under category: MySql Interview Questions