Few Useful Sites To Subscribe

Here I am listing few of the very useful information/resource providing sites that keeps you awake about the things in current trends to buisness,social media, market, entrepreneurship , design , technology.

http://techcrunch.com/
http://sanderssays.typepad.com/sanders_says/
http://www.smashingmagazine.com/
http://sethgodin.typepad.com/seths_blog/
http://dilbert.com/
http://www.leadershipnow.com/leadingblog/
http://www.ted.com/
http://www.spring.org.uk/
http://www.fastcompany.com/
http://www.boomberg.com/
http://www.ft.com

Please add your comment if I missed any important site.

 

Web 2.0 Vs Web 1.0

  • Web 2.0 is about communities, Web 1.0 was about companies
  • Web 2.0 is about blogs, Web 1.0 was about home pages
  • Web 2.0 is about peer to peer, Web 1.0 was about client-server
  • Web 2.0 is about XML, Web 1.0 was about HTML
  • Web 2.0 is about writing, Web 1.0 was about reading
  • Web 2.0 is about tags, Web 1.0 was about taxonomy
  • Web 2.0 is about wireless, Web 1.0 was about wires
  • Web 2.0 is about sharing, Web 1.0 was about owning
  • Web 2.0 is about RSS, Web 1.0 was about portals
  • Web 2.0 is about trade sales, Web 1.0 was about IPOs
  • Web 2.0 is about web applications, Web 1.0 was about web forms
  • Web 2.0 is about APIs, Web 1.0 was about screen scraping
  • Web 2.0 is about broadband, Web 1.0 was about dialup
  • Web 2.0 is about bandwidth costs, Web 1.0 was about hardware costs
  • Web 2.0 is about Google, Web 1.0 was about Netscape

 

PHP Add and Remove Querystring Variables

function add_querystring_var($url, $key, $value) {

$url = preg_replace(‘/(.*)(\?|&)’ . $key . ‘=[^&]+?(&)(.*)/i’, ‘$1$2$4’, $url . ‘&’);

$url = substr($url, 0, -1);

if (strpos($url, ‘?’) === false) {

return ($url . ‘?’ . $key . ‘=’ . $value);

} else {

return ($url . ‘&’ . $key . ‘=’ . $value);

}

}

 

function remove_querystring_var($url, $key) {

$url = preg_replace(‘/(.*)(\?|&)’ . $key . ‘=[^&]+?(&)(.*)/i’, ‘$1$2$4’, $url . ‘&’);

$url = substr($url, 0, -1);

return ($url);

}

EXE in PHP (Make Executable or Make Desktop Application in PHP)

Hello Friends,

I m a web developer and i always use PHP as web scripting server side language but before some days when i found that now it is possible to make EXE in PHP means now you can make Executable or make Desktop application by PHP. Isn’t it Great?

There are many complier available on web by which you can create EXE in PHP.

This program runs through dos and windows only,I don’t know About Linux.If you want to make Executable in PHP then firstly download PHP EXE Compiler/Embedder from Here.

Try to explain you some more things about this.

 

1.First Download zip from Here.

2. Now unzip it and open Command prompt and then go to its directory.

3. Start > run… ‘cmd’
4. Use the “cd..” command to change directory.

5. Place PHP script to be compiled next to bamcompile.exe (same directory)
6. in the cmd prompt, at that directory, type:
ex: “bamcompile test.php”
variations:
“bamcompile -c test.php” gives compression.
-e:something.dll allows a DLL to be embedded

Readymade examples are given in Zipped files which you have downloaded, just try it out.

MySQL Table Types

MySQL supports various of table types or storage engines to allow you to optimize your database. The table types are available in MySQL are:

  • ISAM
  • MyISAM
  • InnoDB
  • BerkeleyDB (BDB)
  • MERGE
  • HEAP

The most important feature to make all the table types above distinction is transaction-safe or not. Only InnoDB and BDB tables are transaction safe and only MyISAM tables support full-text indexing and searching feature. MyISAM is also the default table type when you create table without declaring which storage engine to use. Here are some major features of each table types:

ISAM

ISAM had been deprecated and removed from version 5.x. All of it functionality entire replace by MyISAM. ISAM table has a hard size 4GB and is not portable.

MyISAM

MyISAM table type is default when you create table. MyISAM table work very fast but not transaction-safe. The size of MyISAM table depends on the operating system and the data file are portable from system to system. With MyISAM table type, you can have 64 keys per table and maximum key length of 1024 bytes.

InnoDB

Different from MyISAM table type, InnoDB table are transaction safe and supports row-level locking. Foreign keys are supported in InnoDB tables. The data file of InnoDB table can be stored in more than one file so the size of table depends on the disk space. Like the MyISAM table type, data file of InnoDB is portable from system to system. The disadvantage of InnoDB in comparison with MyISAM is it take more disk space.

BDB

BDB is similar to InnoDB in transaction safe. It supports page level locking but data file are not portable.

MERGE

Merge table type is added to treat multiple MyISAM tables as a single table so it remove the size limitation from MyISAM tables.

HEAP

Heap table is stored in memory so it is the fastest one. Because of storage mechanism, the data will be lost when the power failure and sometime it can cause the server run out of memory. Heap tables do not support columns with AUTO_INCREMENT, BLOB and TEXT characteristics.

 

Send mail from your localhost

Hello Friends !!

When you developing your site then you are facing a problem that how to send mail from your local host ?

Because when you are testing your project/site in localhost then this problem occurred. At that time you think about upload your site on server.

If you don’t want this type of uploading work and you want to test your mail form your localhost then here is the solution.

First of all open your xamp or wamp installed directory.

Then open php directory and find php.ini.

Then open this php.ini in notepad and find [mail function] in that file.

When you find it, remove semi colon before SMTP,smtp_port and sendmail_from.

Set this parameters like this :

SMTP=mail.test.com  //it indicates mail server

smtp_port=25            // it indicates port address

sendmail_from=test@test.com   // it indicates mail id from which you want to send mail

After this, please stop you xamp/wamp services, do refresh and start it again.

Thats it.. Now you can send mail from your localhost..

If you have any query or any confusion then feel free to comment me.

Thanks !!

[PHP] Email Attachment – PDF In Email Attachment

Hi Friends , yesterday I was working with email attachment and I wanted to send pdf file as email attachment but It was giving me so many problems. I have searched so many code for PDF attachment but no one was working So I start tp debug code and finally  made working pdf attachment code by pdf attachment in email worked successfully.

<?php

$fileatt = “test.pdf”; // Path to the file

$fileatt_type = “application/pdf”; // File Type

$fileatt_name = “test.pdf”; // Filename that will be used for the file as the attachment

$email_from = “noreply@hackingethics.com”; // Who the email is from

$email_subject = “Your attached file”; // The Subject of the email

$email_message = “Thanks for visiting <a href=”http://www.hackingethics.com/&#8221; target=”_blank” title=”More about HackingEthics »”>HackingEthics</a>.com! <br>”;

$email_message .= “Thanks for visiting.<br>”; // Message that the email has in it

$email_to = “xyz@gmail.com”; // Who the email is to

$headers = “From: “.$email_from;

$file = fopen($fileatt,’rb’);

$data = fread($file,filesize($fileatt));

fclose($file);

$semi_rand = md5(time());

$mime_boundary = “==Multipart_Boundary_x{$semi_rand}x”;

$headers .= “\nMIME-Version: 1.0\n” .

“Content-Type: multipart/mixed;\n” .

” boundary=\”{$mime_boundary}\””;

$email_message .= “This is a multi-part message in MIME format.\n\n” .

“–{$mime_boundary}\n” .

“Content-Type:text/html; charset=\”iso-8859-1\”\n” .

“Content-Transfer-Encoding: 7bit\n\n” .

$email_message .= “\n\n”;

$data = chunk_split(base64_encode($data));

$email_message .= “–{$mime_boundary}\n” .

“Content-Type: {$fileatt_type};\n” .

” name=\”{$fileatt_name}\”\n” .

//”Content-Disposition: attachment;\n” .

//” filename=\”{$fileatt_name}\”\n” .

“Content-Transfer-Encoding: base64\n\n” .

$data .= “\n\n” .

“–{$mime_boundary}–\n”;

$sent = @mail($email_to, $email_subject, $email_message, $headers);

if($sent) {

echo “Your email attachment has been Worked.”;

} else {

die(“Sorry but the email could not be sent. Please go back and try again!”);

}

?>

Replace your email address in $email_to and filename in $fileatt and $fileatt_name.