Multimedia Video Formats

The AVI Format

The AVI Audio Video Interleave format was developed
 by Microsoft.The AVI format is supported by all computers
running Windows, and by all the most popular web browsers.
 It is a very common format on the Internet, but not always
 possible to play on non-Windows computers.
Videos stored in the AVI format have the extension .avi.

The Windows Media Format

The Windows Media format is developed by Microsoft.
Windows Media is a common format on the Internet,
but Windows Media movies cannot be played on
 non-Windows computer without an extra free
 component installed. Some later Windows Media
 movies cannot play at all on non-Windows computers
 because no player is available.Videos stored in the
Windows Media format have the extension .wmv.

The MPEG Format

The MPEG -Moving Pictures Expert Group format is the
 most popular format on the Internet. It is cross-platform,
and  supported by all the most popular web browsers.
Videos stored in the MPEG format have the
extension .mpg or .mpeg.


The RealVideo Format

The RealVideo format was developed for the
 Internet by Real Media.The format allows streaming
of video on-line video, Internet TV with low bandwidths.
 Because of the low bandwidth priority, quality is
 often reduced.Videos stored in the RealVideo format
 have the extension .rm or .ram.

The Shockwave -Flash Format

The Shockwave format was developed by Macromedia.
The Shockwave format requires an extra component to play.
 This component comes preinstalled with the latest versions
of Netscape and Internet Explorer.Videos stored in the
 Shockwave format have the extension .swf.




Google search operators

filetype:

You can restrict your search to Word documents, to Excel documents,
 to PDF files, orto  PowerPoint  files  by  adding  filetype:doc,
  filetype:xls,  filetype:pdf,  or  filetype:ppt,
respectively, to your search query.
Want a great PowerPoint presentation on email marketing that
you can repurpose fora meeting? Simply query Google for
email marketing filetype:ppt. Need a marketing plan
template? Since the template would most likely be a Word
 document, cut through the web page clutter with a search
of marketing plan template filetype:doc. Side note: Don’t
link to your own marketing plans if you don’t want them showing
 up in Google’s index.

In fact, Google allows any extension to be entered in conjunction
 with the  filetype:
operator, including htm, txt, php, asp, jsp, swf, etc.
Google then matches on yourdesired extension after the filename
 in the URL. Note that there is no space after thecolon when using
 this operator. You can use  ext:instead of  filetype:—they do the same
thing.

site:

You can search within a site or a domain by adding the site:
 operator followed by asite’s domain name to your query.
 For example, you could search for  email marketingbut
 restrict your search to only pages within the MarketingProfs
 site with a queryof: email marketing site:www.marketingprofs.com.

You can also add a subdirectory to the end of the domain
 in a site: query. For exampleemail marketing
site:http://www.marketingprofs.com/tlsTo conduct a comprehensive
 search of all of the associated subdomains of a domain,
omit the www and instead specify only the main domain.
 For example, a search forsite:yahoo.com would  encompass
  not  just  www.yahoo.com,  but  also  movies.yahoo.com,
 travel.yahoo.com,  personals.yahoo.com,  etc.,  The
 site:  search  operator works even when just the domain
extension like .com, .org, .gov, or .co.uk is specified.

Thus,  you  can  restrict  your  search  to  .com  sites  with
  site:com,  to  .gov  sites  with site:gov, or to .co.uk with
 site:co.uk.

Combining Boolean logic with the site: operator will allow
 you to search within multiple  sites  simultaneously. 
For  instance,  email  marketing site:marketingprofs.com  |
site:marketingsherpa.com  | site:marketingpower.com searches
 the three sites simultaneously.

The site: operator can be specified by itself without
other search words to get a list of all pages indexed,
 such as site:www.marketingprofs.com. Again, note that there
is no space after the colon when using this operator.
Use this approach to simultaneously search competitor sites for keywords of particular
relevance e.g., related products you want to monitor.

 Then either create a bookmark
to easily monitor the index or create a Google Alert to be
explored later in this book to receive an email any time
 the index changes.

The site:operator works outside of ordinary web search—it also works with Google
Images, Google Product Search, and Google News.

inurl:
Use the inurl:operator to restrict the search results to
 pages that contain a particular word in the web address.
This can be especially useful if you want Google to display
 all the pages it has found within a particular directory
on a particular site, such as inurl:ftp
site:http://www.kellogg.northwestern.eduor all the
 pages with a particular script name, such as
inurl:ToolPage site:http://www.vfinance.com.
Again, there is no space after the colon when using
this operator.

allinurl:

This operator is similar in function to the  inurl:operator,
 but is used for finding multiplewords in the web address.
It eliminates the need to keep repeating  inurl:in front of
every word you want to search for in the URL.
For instance,  allinurl: china exportingis an equivalent
 and more concise form of the
query inurl:china inurl:exportingto find web pages that contain
 the words  chinaandexportinganywhere in the URL,
including the filename, directory names, extension, or
domain. There IS a space after the colon when using the allinurl:operator.
intext:
Searches for a word in the main body text. This is used in a similar fashion to inurl:.
For instance, if you wanted to find only pages that referenced Stephen Hawking and
relativity, you might search for stephen hawking intext:relativity.
allintext:
Searches for multiple words within the body text of indexed pages. This is used in a
similar fashion to allinurl:.

intitle:

Use the intitle: operator (such as intitle:marketing) to look for documents where your
specified word or phrase matches in the page title. This is the hyperlinked text (usually
blue) in the Google search result, which also appears in your browser’s topmost bar.
If you want to find Microsoft Word documents in which the document title (located
within Properties under the File menu in Word) includes the phrase marketing plan,
you would use the query intitle:“marketing plan” filetype:doc. Follow the  intitle: operator with a word or a phrase in quotes, without a space after the colon.

allintitle:

This works like intitle: but searches for multiple words in the title. For instance, use
allintitle: channel conflict online retailto search for documents that contain all four of
those words in the title. Note that there is a space after the colon when using this
operator.

inanchor:

The inanchor: operator will restrict your search to pages where the underlined text of
inbound links matches your search word. For example, if you wanted to search for
merchandising  but  confine  your  search  primarily  to  home  pages,  merchandising
inanchor:homewould do the trick, since most sites link to their own home pages using
the link text of “Home.”
Follow the inanchor: operator with a word or a phrase in quotes, without a space after
the colon.

allinanchor:

This works like inanchor: but searches for multiple words in the link text. For example,
the  query  web  metrics  allinanchor:  download  trial would  invoke  a  search  for  pages
relating to web metrics that have the words downloadand trialin the link text.
Note that there is a space after the colon when using this operator.

daterange:

The daterange: operator restricts the search results to pages added or updated within
the specified date range. Unfortunately, it only accepts Julian dates, which makes it
less user-friendly than it could be. You can find Gregorian-to-Julian date converters
online, e.g. here: http://www.fourmilab.ch/documents/calendar
You’ll usually find it easier just to do your search first without a date range, then use
the custom date range options in the “More search tools” area of the result page.

related:

related: queries show pages that are similar to the specified web page. Follow this operator with a web address, such as  related:http://www.marketingprofs.com, and you
would find web pages that are related to the MarketingProfs home page. This is identical
to the Similar link in the bottom left of the Preview pane of each search result.

info:

An info: query lets you know whether the specified page is known by Google, and it
provides the title and a snippet (if available), a link to the page, a link to a cached version
of the page (see below for an explanation of this), and a link to view pages that link to
the specified page.
Supply a web address after this operator, such as info:http://www.marketingprofs.com.

link:

The link: operator returns a sampling of pages (i.e., a small subset of the total) that link
to the specified web page. Follow this operator with a web address, such as link:http://

cache:

The  cache:  operator  provides  a  snapshot  view  of  a  web  page  as  it  looked  when
Googlebot last  visited  the  page.  Follow  this  operator  with  a  web  address,  such  as
cache:http://www.marketingprofs.comto view the page that Google has cached. Note
that Googlebot must have downloaded the page in order for this to work.

define:

This is a useful operator for quickly obtaining several definitions from various online
glossaries. Curious about the definition of “tipping point”? Simply type define: tipping
pointinto Google.

stocks:

Wondering how your competitor is performing on Wall Street? Enter this operator
followed by a ticker symbol to retrieve financial information, including latest stock
quotes from Google Finance. Note that in most circumstances this operator is optional.
Google figures out if the query is a ticker symbol pretty well.

iPhone 6-water-resistant body

iPhone 6 leak type of weekend - our inbox was buried with all sorts of tips about Apple's upcoming smartphone. After getting compared to the iPhone 5s and the Galaxy S5, the iPhone 6 now sits besides the iPod touch. These alleged comparison shots make the design cues the new smartphone model takes from its music player cousin all the more obvious. Alleged iPhone 6 prototype and iPod touch Additional iPhone 5s / 6 comparison shots made their way out of China along with dimensions - 138 x 67 x 7mm.

 That's considerably larger than the 135.3 x 71.9 x 6.1mm we estimated from the earlier leak. iPhone 6 prototype next to iPhone 5s Keep in mind that this new iPhone is said to have a 4.7" screen, accounting for the larger size. Apple security in China seems to have really broken down as an iPhone 6 dummy was photographed all around a city. Note that this could also be an upcoming knockoff of the iPhone 6 (remember the iploxe?). You can see all photos of the city tour at the Moscoat forum, but these in particular caught our eye. First off, the iPhone 6 gets dunked in water - either because it will be water resistant or because this is a non-working dummy - and then it gets sized up against the iPhone 5s and HTC One M8.

Windows Phone 8.1

Microsoft will begin officially rolling out Windows Phone 8.1 on June 24th. This should coincide with the launch of the Lumia 930, Nokia's upcoming flagship. Just like other iterations of Windows Phone software, 8.1 will feature the typical 3 years of software support and updates.

 Microsoft will make updates available for the Operating System, including security updates, for a minimum of 36 months after the lifecycle start date. These updates will be incremental, with each update built on the update that preceded it. Customers need to install each update in order to remain supported. The distribution of these incremental updates may be controlled by the mobile operator or the phone manufacturer from which you purchased your phone, and installation will require that your phone have any prior updates. Update availability will also vary by country, region, and hardware capabilities. Windows Phone 8.1 brings a host of new features and seems primed to make Microsoft's mobile OS a much more intriguing option for consumers.

Samsung - Tizen handsets - Russia and India

Samsung has been enjoying amazing success with their Galaxy line of handsets rocking Android but they've made it apparent that they plan on launching their own mobile OS: Tizen. Now Tizen isn't exactly well known outside of the more hardcore cell phone fanatic crowd, but the Korean tech giant has already made plans on getting it out there with their newest crop of Galaxy Gear smartwatches. It looks like wearables aren't the only devices that Samsung plans on using Tizen for, however, as there is word that Sammie will try to get Tizen to build traction in markets outside of Europe and the US: namely India and Russia.



 The two regions could see Tizen packing Samsung handsets as early as the next few upcoming weeks. Recently, a Tizen handset was supposed to launch in Japan for the carrier NTT Docomo, however, the deal fell through as NTT deemed that it wasn't the right time for them to do so. Orange in France also got cold feet about releasing Tizen smartphones. Seeing as Tizen isn't exactly getting any love from carriers, it doesn't look like a launch in Europe or the States is going to happen in the near future. However, countries like Russia and India and other emerging markets.

What is an array?

An array is a variablethat stores more than onepiece of related data in a single variable. Think
of an array as a box of chocolateswith slotsinside. The box representsthe arrayitself while
the spacescontaining chocolates representthe valuesstored in the arrays.

Numeric Arrays
Numeric arrays use number as access keys. An access key is a reference to a memory slot in an
array variable. The access key is used whenever we want to read or assign a new value an array
element.
Below is the syntaxfor creating numeric arrays.
$variable_name[n] = value;

<?php
//create an associative array of persons
$persons = array('Mary' => 'Female', 'John' => 'Male', 'Mirriam' => 'Female');
print_r($persons); //print all contents of persons array
echo '<br>'; //create new line
echo 'Mary is a ' . $persons['Mary']; //get mary's gender
?>

Multi-dimensional arrays
These are arraysthat contain other nested arrays. The advantage of multidimensional arrays is
that they allow us to group related datatogether.




Count function
The count functionis used to countthe numberof elementsthat an array contains.
The code
below shows the implementation.

<?php
$lecturers = array('Mr. Jones', 'Mr. Banda', 'Mrs. Smith');
echo count($lecturers); //outputs 3
?>

is_array function
The is_array functionis used to determineif a variableis an arrayor not. Let’s now look at
an example that implements the is_array functions.

<?php
$lecturers = array('Mr. Jones', 'Mr. Banda', 'Mrs. Smith');
echo is_array($lecturers);
?>

The above code outputs
1

Sort – 
this function is used to sort arrays by the values. If the values are alphanumeric, it sorts
them in alphabetical order. If the values are numeric, it sorts them in ascending order. It removes
the existing access keys and add new numeric keys. The output of this function is a numeric
array.

<?php
$persons = array('Mary' => 'Female', 'John' => 'Male', 'Mirriam' => 'Female');
sort($persons);
print_r($persons);
?>

Arrays are special variableswith the capacityto store multi values.

Arrays are flexibilityand can be easily stretchedto accommodate more values.
Numeric arraysuse numbers for the array keys
Associative arraysuse descriptive namesfor array keys
The is_arrayfunction is used to determinewhether a variableis a valid array or not.

Find Links to Any Web Site

When you browse to a web site you've never seen before, you don't have very much advance knowledge about the site. You might know that you've followed a link from a particular site that you read frequently, or you might have found the site in some search results for a certain search term. Of course, the site itself can tell you quite a bit, but that still doesn't give you any clues about where the site fits into the larger Web. With some searching at Yahoo!, you can get extra info about a site by using the special link: syntax.
If you want to find what sites are linking to any other particular site, you can browse to http://search.yahoo.com and  enter this query: link:insert URL.

 Instead of standard search results, Yahoo! will display a list of the sites that link to the URL you've specified in the query. For example, if you'd like to find out where the O'Reilly Hacks site fits into the Web, you could search for link:http://hacks.oreilly.com.
In the results, you immediately get a sense of how many pages link to the site and what kinds of sites are linking there. If you're browsing the Web, leaving a site to do a quick Yahoo! link: search can be annoying if you'd just like to get this sense about the current site you're visiting. To find the sites, you need to copy the current URL from your browser address bar, open a new window or tab, browse to Yahoo!, and then assemble the proper query. It's a quick process, but you can speed it up considerably with a bit of classic ASP and a JavaScript bookmarklet.

This hack uses JavaScript to get the URL of the current page you're viewing in your browser. From there, it passes the URL to a server-side script that assembles the proper Yahoo! query and fetches the top 10 results with Yahoo! Search Web Services. A new pop-up window will give a quick look at which sites are linking to the current page, without leaving your place.

Spider the Yahoo Catalog

Writing a spider to spider an existing spider's site may seem convoluted, but it can prove useful when you're looking for location-based services. This hack walks through creating a framework for full-site spidering, including additional filters to lessen your load.
In this hack, you'll learn how to write a spider that crawls the Yahoo! group of portals. The choice of Yahoo! was obvious; because it is one of the largest Internet portals in existence, it can serve as an ideal example of how one goes about writing a portal spider.
But before we get to the gory details of code, let's define what exactly a portal spider is. While many may argue with such a classification, I maintain that a portal spider is a script that automatically downloads all documents from a preselected range of URLs found on the portal's site or a group of sites, as is the case with Yahoo!. A portal spider's main job is to walk from one document to another, extract URLs from downloaded HTML, process said URLs, and go to another document, repeating the cycle until it runs out of URLs to visit. Once you create code that describes such basic behavior, you can add additional functionality, turning your general portal spider into a specialized one.
Although writing a script that walks from one Yahoo! page to another sounds simple, it isn't, because there is no general pattern followed by all Yahoo! sites or sections within those sites. Furthermore, Yahoo! is not a single site with a nice link layout that can be described using a simple algorithm and a classic data structure. Instead, it is a collection of well over 30 thematic sites, each with its own document layout, naming conventions, and peculiarities in page design and URL patterns. For example, if you check links to the same directory section on different Yahoo! sites, you will find that some of them begin with http://www.yahoo.com/r, some begin with http://uk.yahoo.com/r/hp/dr, and others begin with http://kr.yahoo.com.

If you try to look for patterns, you will soon find yourself writing long if/ elsif/else sections that are hard to maintain and need to be rewritten every time Yahoo! makes a small change to one of its sites. If you follow that route, you will soon discover that you need to write hundreds of lines of code to describe every kind of behavior you want to build into your spider.

This is particularly frustrating to programmers who expect to write code that uses elegant algorithms and nicely structured data. The hard truth about portals is that you cannot expect elegance and ease of spidering. Instead, prepare yourself for a lot of detective work and writing (and throwing away) chunks of code in a hit-and-miss fashion. Portal spiders are written in an organic, unstructured way, and the only rule you should follow is to keep things simple and add specific functionality only once you have the general behavior working.

Okaywith taxonomy and general advice behind us, we can get to the gist of the matter. The spider in this hack is a relatively simple tool for crawling Yahoo! sites. It makes no assumptions about the layout of the sites; in fact, it makes almost no assumptions whatsoever and can easily be adapted to other portals or even groups of portals. You can use it as a framework for writing specialized spiders.

Save the following code to a file called yspider.pl:


iPhone 5c 8GB - Llaunch

Apple is bringing its 8GB iPhone 5c to India. The 8GB variant was originally released back in March as the lowest cost current-generation iPhone option available.


The 16GB 5c currently retails in the region for 41,900 Rs., and the 8GB version in Europe is presently priced at 50 cheaper than the 16GB, which is the equivalent of 4,100 Rs. This means that the 8GB iPhone 5c could cost less than 35,000 Rs., which would be a huge selling point for Apple in India. Because of Apple's strong worldwide brand name, it is easy for them to sell their previous generation phones in regions like India and still turn a healthy profit.


 CEO Tim Cook even discussed the growth Apple has enjoyed in the Indian market: "iPhone sales grew by strong double-digits year-over-year, and in India and Vietnam sales more than doubled.

 The 8GB iPhone 5c should drop in India in the next few weeks, and expect the low-cost device to start popping up

Detecting JavaScript and Cookie Compatibility

You may be expecting a huge dump of code to see if JavaScript and cookies are enabled. There ’ s no way
that you ’ d want to go through with something like that at this point in the project, so the following
minimalist code is offered as a decent check for JavaScript compatibility:
< noscript >
You will not be able to view this site if JavaScript is not enabled.
Please turn on JavaScript to use this site.
< /noscript >

 all you need to put in your template view, and you ’ re 100 percent covered. If they don ’ t
have JavaScript turned on, they get this message. There really is no way to test to see if JavaScript is
turned on (after all, if it is off, you can ’ t run a test to see if it is on.
if (true){
//do something here, we must be on
}else{
//well shucks, JavaScript turned off, there’s no way to send an error message!
}

The  < noscript > option is very straightforward and displays just the error message. You might want to
add some branding to it, like the Claudia ’ s Kids logo, maybe a phone number or other information, but
that ’ s about as good as it gets. You could also contemplate removing the AJAX handlers from the
shopping carts, but that seems a bit much.

The same thing goes when checking for cookie support. You ’ ll need just a small bit of code that will try
to set a test cookie with a value say, the integer 1. If the site can write the cookie and retrieve it OK, then
cookies are supported. If not, display an error message.

< script >
var tcookie = new Date();
check_cookie = (tcookie.getTime() + ‘’);
document.cookie = “check_cookie=” + check_cookie + “; path=/”;
if (document.cookie.indexOf(check_cookie,0) < 0) {
alert(“You will not be able to view this site if cookies are not enabled.
Please enable them now.”);
}

< /script >

CodeIgniter system Folder

The system/ folder is where all the action happens. This folder contains all the CodeIgniter code of
consequence, organized into various folders:

application —  The   application foldercontains the application you ’ re building. Basically, this
folder contains your models, views, controllers, and other code (like helpers and class
extensions). In other words, this folder is where you ’ ll do 99 percent of your work.

cache —  The   cache foldercontains all cached pages for your application. In Chapter 9 , you learn
more about caching and how to turn your super - speedy development application into a
blazingly fast live application.

codeigniter —  The   codeigniter folderis where CodeIgniter ’ s core classes live. You have almost no
reason to go in here. All of your work will occur in the application folder. Even if your intent is
to extend the CodeIgniter core, you would do it with hooks, and hooks live in the application
folder.

database —  The   database foldercontains core database drivers and other database utilities. Again,
there ’ s no good reason for you to be in this folder.
fonts —  The   fonts foldercontains font - related information and utilities. Again, there ’ s no reason
to spend any time here.

helpers —  The   helpers foldercontains standard CodeIgniter helpers (such as date, cookie, and
URL helpers). You ’ ll make frequent use of helpers in your CodeIgniter career and can even
extend helpers thanks to improvements introduced in CodeIgniter version 1.6.

language —  The   language foldercontains language files. You can ignore it for now.

libraries —  The   libraries foldercontains standard CodeIgniter libraries (to help you with e - mail,
calendars, file uploads, and more). You can create your own libraries or extend (and even
replace) standard ones, but those will be saved in the application/libraries directory to keep
them separate from the standard CodeIgniter libraries saved in this particular folder.

logs —  The   logs folderis the folder CodeIgniter uses to write error and other logs to.


plugins —  The   plugins foldercontains plugins. Plugins and helpers are very similar, in that they
both allow developers to quickly address an issue or create content like forms, links, etc..

However, the main difference between them is that plugins usually consist of one function,
while helpers often have many functions bundled inside them.

CodeIgniter config.php

The  config.php filecontains a series of configuration options all of them stored in a PHP array called,
appropriately enough, $config) that CodeIgniter uses to keep track of your application ’ s  information
and settings.

The first configuration option you need to set inside config.php is the base URL of your application. You
do that by setting the absolute URL (including the http:// part) for $config[ ‘ base_url ’ ], like so:
$config[‘base_url’] = “http://www.example.com/test/”;

Once  you ’ ve set this configuration option, you can recall it whenever you want using the CodeIgniter
base_url()function, which can be a very handy thing to know. This one feature keeps you from
having to rewrite hard - coded URLs in your application, when you migrate from development to test or
from test to production.

The second thing you need to do is set a value for your home page by editing the $config[ ‘ index_
page ’ ]configuration option. CodeIgniter ships with a value of “ index.php ”  for  this  option,  which
means that index.php will appear in all of your URLs. Many CodeIgniter developers prefer to keep this
value blank, like so:
$config[‘index_page’] = ‘’;
To make this work, you need to include an .htaccess file to the CodeIgniter root directory, After  you ’ ve set this option value, there ’ s very little to do.
 For now, leave all the other values at their
default settings:
$config[‘uri_protocol’] = “AUTO”;
$config[‘url_suffix’] = “”;
$config[‘language’] = “english”;
$config[‘charset’] = “UTF-8”;
$config[‘enable_hooks’] = FALSE;
$config[‘subclass_prefix’] = ‘MY_’;
$config[‘permitted_uri_chars’] = ‘a-z 0-9~%.:_-’;
$config[‘enable_query_strings’] = FALSE;
$config[‘controller_trigger’] = ‘c’;
$config[‘function_trigger’] = ‘m’;
$config[‘log_threshold’] = 0;
$config[‘log_path’] = ‘’;
$config[‘log_date_format’] = ‘Y-m-d H:i:s’;


$config[‘cache_path’] = ‘’;
$config[‘encryption_key’] = “enter_a_32_character_string_here”;
$config[‘sess_cookie_name’] = ‘ci_session’;
$config[‘sess_expiration’] = 7200;
$config[‘sess_encrypt_cookie’] = TRUE;
$config[‘sess_use_database’] = FALSE;
$config[‘sess_table_name’] = ‘ci_sessions’;
$config[‘sess_match_ip’] = FALSE;
$config[‘sess_match_useragent’] = TRUE;
$config[‘cookie_prefix’] = “”;
$config[‘cookie_domain’] = “”;
$config[‘cookie_path’] = “/”;
$config[‘global_xss_filtering’] = TRUE;
$config[‘compress_output’] = FALSE;
$config[‘time_reference’] = ‘local’;
$config[‘rewrite_short_tags’] = FALSE

For more details on each of these configuration options, simply read the comments embedded in /
system/application/config/config.php. You will also get more detail on certain settings as you work
through the sections of the book and tweak the configuration as needed. For example, at some point, you
will want to use encryption for security purposes or set your logging threshold for debugging, and they
both require making changes to this file.

CodeIgniter ’ s Global XSS Filtering option is set to FALSE by default. The online User Guide suggests
that setting this to TRUE adds a lot of performance overhead to the system. However, at this point, it is
better to have some global protection put in place. That way you can be assured of some security
precautions while you ’ re in development. Chapter 9 discusses security issues in more depth, but for
now, it ’ s good to have something in place while you ’ re  developing.

In the same security vein, notice that sess_encrypt_cookie has been set to TRUE, and that you are to
enter a 32 - character encryption salt in encryption_key. Doing these two things will encrypt any
sessions and provide a salt for any hashing methods you use. Be sure to use a random string of upper -
and lowercase letters and numbers.

One final note before moving on: Make sure that you write down your encryption key and keep it safe
somewhere, or, at least, maintain good backups. You ’ ll need the key to retrieve other information, so if
your site is compromised or erased or if you lose your key any other way, you ’ ll be glad you have a
record  of  it.

Yahoo! Directory

While Yahoo! Search tries to include as many sites as possible in its index, the Yahoo! Directory is more like an exclusive club, where sites have to be approved by Yahoo! Editors. Because Yahoo! wants to maintain a highly useful directory, the steps for inclusion are a bit more involved.
To see if your site is already listed in the Yahoo! Directory, browse to http://dir.yahoo.com and search for the title of your site. If you don't see your site among the results, you can suggest your site to the Yahoo! Directory.

The first thing you need to determine about your site is whether it's commercial or noncommercial, because you'll need to pay $299 to submit a commercial site. According to Yahoo!, "If your site sells something, promote[s] goods and services, or represents a company that sells products and/or services," your site is commercial and should be listed somewhere in the Business and Economy category within the directory. If your site is purely personal, informational, or not-for-profit, your site is noncommercial. A banner ad or text ad on your site doesn't necessarily make your site commercial; if you have such an ad, it'll be up to the Yahoo! Editors to decide whether your site is commercial.


Adding a noncommercial site.
The first step to adding a noncommercial site is to find the appropriate category for your site. If you know of some sites that are similar to yours, you might try searching for the titles of those sites within the directory to see how they're categorized. Otherwise, start browsing through the directory at http://dir.yahoo.com for the most appropriate place for your site. If your site is a personal home page, browse to "Society and Culture"  People  Personal Home Pages. If your site is a weblog, you'll want to browse to "Computers and Internet"  Internet  World Wide Web  Weblogs.
Once you've found the appropriate category, click the "Suggest a Site" link at the top of the page. Choose Standard Consideration and follow the instructions for adding a site. You'll have the option to include a site title, URL, geographic location, and description. If you have suggestions about other categories that your site might be appropriate for, you can include those suggestions in notes to Yahoo! Editors.
Once you've made your submission, the waiting game begins. Yahoo! doesn't guarantee that all sites submitted will be reviewed, and many sites are not included in the directory. If your site doesn't show up in the directory within two or three weeks, you can resubmit your site using the same process. Multiple submissions in a short period of time could exclude your site from consideration altogether. To be guaranteed a response about your site's placement within the directory, you can submit your site as if it were a commercial site, paying the commercial fee.


What is Web browser?

Software that lets a user view HTML documents and access files and software related to those documents. Originally developed to allow users to view or browse documents on the World Wide Web, Web browsers can blur the distinction between local and remote resources for the user by also providing access to documents on a network, an intranet, or the local hard drive. Web browser software is built on the concept of hyperlinks, which allow users to point and click with a mouse in order to jump from document to document in whatever order they desire. Most Web browsers are also capable of downloading and transferring files, providing access to newsgroups, displaying graphics embedded in the document, playing audio and video files associated with the document, and executing small programs, such as Java applets or ActiveX controls included by programmers in the documents. Helper applications or plug-ins are required by some Web browsers to accomplish one or more of these tasks. Also called: browser.

What is timing attack?

An attack on a cryptographic system that exploits the fact that different cryptographic operations take slightly different amounts of time to process. The attacker exploits these slight time differences by carefully measuring the amount of time required to perform private key operations. Taking these measurements from a vulnerable system can reveal the entire secret key. Cryptographic tokens, network-based cryptosystems, and other applications where attackers can make reasonably accurate timing measurements are potentially at risk from this form of attack.

What is macro assembler?

An assembler that can perform macro substitution and expansion. The programmer can define a macro that consists of several statements and then use the macro name later in the program, thus avoiding having to rewrite the statements. For example, a macro called swap exchanges the values of two variables: After defining swap, the programmer can then insert an instruction such as “swap a, b” in the assembly language program. While assembling, the assembler replaces the instruction with the statements within the macro that swap the values of the variables a and b.

E-Mail Security

When an e-mail message is sent between two distant sites, it will generally transit dozens of machines on the way. Any of these can read and record the message for future use. In practice, privacy is nonexistent, despite what many people think. Nevertheless, many people would like to be able to send e-mail that can be read by the intended recipient and no one else: not their boss and not even their government. This desire has stimulated several people and groups to apply the cryptographic principles we studied earlier to e-mail to produce secure e-mail. In the following sections we will study a widely-used secure e-mail system, PGP, and then briefly mention two others, PEM and S/MIME. For additional information about secure e-mail.

PGP supports four RSA key lengths. It is up to the user to select the one that is most appropriate. The lengths are
  1. Casual (384 bits): can be broken easily today.
  2. Commercial (512 bits): breakable by three-letter organizations.
  3. Military (1024 bits): Not breakable by anyone on earth.
  4. Alien (2048 bits): Not breakable by anyone on other planets, either.

Since RSA is only used for two small computations, everyone should use alien strength keys all the time.

Key management has received a large amount of attention in PGP as it is the Achilles heel of all security systems. Key management works as follows. Each user maintains two data structures locally: a private key ring and a public key ring. The private key ring contains one or more personal private-public key pairs. The reason for supporting multiple pairs per user is to permit users to change their public keys periodically or when one is thought to have been compromised, without invalidating messages currently in preparation or in transit. Each pair has an identifier associated with it so that a message sender can tell the recipient which public key was used to encrypt it. Message identifiers consist of the low-order 64 bits of the public key. Users are responsible for avoiding conflicts in their public key identifiers. The private keys on disk are encrypted using a special arbitrarily long password to protect them against sneak attacks.

The public key ring contains public keys of the user's correspondents. These are needed to encrypt the message keys associated with each message. Each entry on the public key ring contains not only the public key, but also its 64-bit identifier and an indication of how strongly the user trusts the key.


Digital Signatures

The authenticity of many legal, financial, and other documents is determined by the presence or absence of an authorized handwritten signature. And photocopies do not count. For computerized message systems to replace the physical transport of paper and ink documents, a method must be found to allow documents to be signed in an unforgeable way.
The problem of devising a replacement for handwritten signatures is a difficult one. Basically, what is needed is a system by which one party can send a signed message to another party in such a way that the following conditions hold:

  1. The receiver can verify the claimed identity of the sender.
  2. The sender cannot later repudiate the contents of the message.
  3. The receiver cannot possibly have concocted the message himself.

The first requirement is needed, for example, in financial systems. When a customer's computer orders a bank's computer to buy a ton of gold, the bank's computer needs to be able to make sure that the computer giving the order really belongs to the company whose account is to be debited. In other words, the bank has to authenticate the customer (and the customer has to authenticate the bank).
The second requirement is needed to protect the bank against fraud. Suppose that the bank buys the ton of gold, and immediately thereafter the price of gold drops sharply. A dishonest customer might sue the bank, claiming that he never issued any order to buy gold. When the bank produces the message in court, the customer denies having sent it. The property that no party to a contract can later deny having signed it is called nonrepudiation. The digital signature schemes that we will now study help provide it.
The third requirement is needed to protect the customer in the event that the price of gold shoots up and the bank tries to construct a signed message in which the customer asked for one bar of gold instead of one ton. In this fraud scenario, the bank just keeps the rest of the gold for itself.

Symmetric-Key Signatures

One approach to digital signatures is to have a central authority that knows everything and whom everyone trusts, say Big Brother (BB). Each user then chooses a secret key and carries it by hand to BB's office. Thus, only Alice and BB know Alice's secret key, KA, and so on.
When Alice wants to send a signed plaintext message, P, to her banker, Bob, she generates KA(B, RA, t, P), where B is Bob's identity, RA is a random number chosen by Alice, t is a timestamp to ensure freshness, and KA(B, RA, t, P) is the message encrypted with her key, KABB sees that the message is from Alice, decrypts it, and sends a message to Bob as shown. The message to Bob contains the plaintext of Alice's message and also the signed message KBB (A, t, P). Bob now carries out Alice's request.

Public-Key Signatures

A structural problem with using symmetric-key cryptography for digital signatures is that everyone has to agree to trust Big Brother. Furthermore, Big Brother gets to read all signed messages. The most logical candidates for running the Big Brother server are the government, the banks, the accountants, and the lawyers. Unfortunately, none of these organizations inspire total confidence in all citizens. Hence, it would be nice if signing documents did not require a trusted authority.
Fortunately, public-key cryptography can make an important contribution in this area. Let us assume that the public-key encryption and decryption algorithms have the property that E(D(P)) = P in addition, of course, to the usual property that D(E(P)) = P. (RSA has this property, so the assumption is not unreasonable.) Assuming that this is the case, Alice can send a signed plaintext message, P, to Bob by transmitting EB(DA(P)). Note carefully that Alice knows her own (private) key, DA, as well as Bob's public key, EB, so constructing this message is something Alice can do.


Network Security


For the first few decades of their existence, computer networks were primarily used by university researchers for sending e-mail and by corporate employees for sharing printers. Under these conditions, security did not get a lot of attention. But now, as millions of ordinary citizens are using networks for banking, shopping, and filing their tax returns, network security is looming on the horizon as a potentially massive problem. In this chapter, we will study network security from several angles, point out numerous pitfalls, and discuss many algorithms and protocols for making networks more secure.

Security is a broad topic and covers a multitude of sins. In its simplest form, it is concerned with making sure that nosy people cannot read, or worse yet, secretly modify messages intended for other recipients. It is concerned with people trying to access remote services that they are not authorized to use. It also deals with ways to tell whether that message purportedly from the IRS saying: Pay by Friday or else is really from the IRS and not from the Mafia. Security also deals with the problems of legitimate messages being captured and replayed, and with people trying to deny that they sent certain messages.

Network security problems can be divided roughly into four closely intertwined areas: secrecy, authentication, nonrepudiation, and integrity control. Secrecy, also called confidentiality, has to do with keeping information out of the hands of unauthorized users. This is what usually comes to mind when people think about network security. Authentication deals with determining whom you are talking to before revealing sensitive information or entering into a business deal. Nonrepudiation deals with signatures: How do you prove that your customer really placed an electronic order for ten million left-handed doohickeys at 89 cents each when he later claims the price was 69 cents? Or maybe he claims he never placed any order. Finally, how can you be sure that a message you received was really the one sent and not something that a malicious adversary modified in transit or concocted?

All these issues (secrecy, authentication, nonrepudiation, and integrity control) occur in traditional systems, too, but with some significant differences. Integrity and secrecy are achieved by using registered mail and locking documents up. Robbing the mail train is harder now than it was in Jesse James' day.
Also, people can usually tell the difference between an original paper document and a photocopy, and it often matters to them. As a test, make a photocopy of a valid check. Try cashing the original check at your bank on Monday. Now try cashing the photocopy of the check on Tuesday. Observe the difference in the bank's behavior. With electronic checks, the original and the copy are indistinguishable. It may take a while for banks to learn how to handle this.

PHP Networking Functions

People authenticate other people by recognizing their faces, voices, and handwriting. Proof of signing is handled by signatures on letterhead paper, raised seals, and so on. Tampering can usually be detected by handwriting, ink, and paper experts. None of these options are available electronically. Clearly, other solutions are needed.

Before getting into the solutions themselves, it is worth spending a few moments considering where in the protocol stack network security belongs. There is probably no one single place. Every layer has something to contribute. In the physical layer, wiretapping can be foiled by enclosing transmission lines in sealed tubes containing gas at high pressure. Any attempt to drill into a tube will release some gas, reducing the pressure and triggering an alarm. Some military systems use this technique.

Introduction to Cryptography

Historically, four groups of people have used and contributed to the art of cryptography: the military, the diplomatic corps, diarists, and lovers. Of these, the military has had the most important role and has shaped the field over the centuries. Within military organizations, the messages to be encrypted have traditionally been given to poorly-paid, low-level code clerks for encryption and transmission. The sheer volume of messages prevented this work from being done by a few elite specialists.

Until the advent of computers, one of the main constraints on cryptography had been the ability of the code clerk to perform the necessary transformations, often on a battlefield with little equipment. An additional constraint has been the difficulty in switching over quickly from one cryptographic method to another one, since this entails retraining a large number of people. However, the danger of a code clerk being captured by the enemy has made it essential to be able to change the cryptographic method instantly if need be. 

The messages to be encrypted, known as the plaintext, are transformed by a function that is parameterized by a key. The output of the encryption process, known as the ciphertext, is then transmitted, often by messenger or radio. We assume that the enemy, or intruder, hears and accurately copies down the complete ciphertext. However, unlike the intended recipient, he does not know what the decryption key is and so cannot decrypt the ciphertext easily. Sometimes the intruder can not only listen to the communication channel (passive intruder) but can also record messages and play them back later, inject his own messages, or modify legitimate messages before they get to the receiver (active intruder). The art of breaking ciphers, called cryptanalysis, and the art devising them (cryptography) is collectively known as cryptology.

The nonsecrecy of the algorithm cannot be emphasized enough. Trying to keep the algorithm secret, known in the trade as security by obscurity, never works. Also, by publicizing the algorithm, the cryptographer gets free consulting from a large number of academic cryptologists eager to break the system so they can publish papers demonstrating how smart they are. If many experts have tried to break the algorithm for 5 years after its publication and no one has succeeded, it is probably pretty solid.
Since the real secrecy is in the key, its length is a major design issue. Consider a simple combination lock. The general principle is that you enter digits in sequence. Everyone knows this, but the key is secret. A key length of two digits means that there are 100 possibilities. A key length of three digits means 1000 possibilities, and a key length of six digits means a million. The longer the key, the higher the work factor the cryptanalyst has to deal with. The work factor for breaking the system by exhaustive search of the key space is exponential in the key length. Secrecy comes from having a strong (but public) algorithm and a long key. To prevent your kid brother from reading your e-mail, 64-bit keys will do. For routine commercial use, at least 128 bits should be used. To keep major governments at bay, keys of at least 256 bits, preferably more, are needed.

From the cryptanalyst's point of view, the cryptanalysis problem has three principal variations. When he has a quantity of ciphertext and no plaintext, he is confronted with the ciphertext-only problem. The cryptograms that appear in the puzzle section of newspapers pose this kind of problem. When the cryptanalyst has some matched ciphertext and plaintext, the problem is called the known plaintext problem.

The next improvement is to have each of the symbols in the plaintext, say, the 26 letters for simplicity, map onto some other letter. For example,
plaintext: a b c d e f g h i j k l m n o p q r s t u v w x y z
ciphertext: Q W E R T Y U I O P A S D F G H J K L Z X C V B N M
The general system of symbol-for-symbol substitution is called a monoalphabetic substitution, with the key being the 26-letter string corresponding to the full alphabet. For the key above, the plaintext attack would be transformed into the ciphertext QZZQEA.



Program Yahoo! with PHP 5

Take advantage of some of the latest features in PHP to quickly add Yahoo! data to PHP-powered pages.
The recursively named PHP Hypertext Processor language is a popular choice for building dynamic web applications. In fact, Yahoo! itself has made PHP its development platform of choice across the company.

 The PHP platform is continually evolving, and the latest version Version 5 includes a handy XML parser called SimpleXML. As the name implies, it's easy to work with. And as long as the XML that SimpleXML is parsing is fairly simple, it's the perfect tool for getting XML data into objects PHP can easily manipulate.
Yahoo! Search Web Services responses definitely qualify as simple XML, and this hack shows how easy it is to request and parse this data with PHP. You'll need PHP 5 for this hack, but you won't need any external modules.

<?php
// yahoo_search.php
// Accepts a search term and shows the top results.
// Usage: yahoo_search.php?p=<Query>
//
// You can create an AppID, and read the full documentation
// for Yahoo! Web Services at http://developer.yahoo.net/

// Set your unique Yahoo! Application ID
$appID = "insert your app ID";

// Grab the incoming search query, and encode for a URL
$query = $_GET['p'];
$query = urlencode($query);

if ($query == "") { 
 print "usage: yahoo_search.php?p=&lt;Query&gt;"; die;
}

// Construct a Yahoo! Search Query with only required options
$language = "en";
$req_url = "http://api.search.yahoo.com/";
$req_url .= "WebSearchService/V1/webSearch?";
$req_url .= "appid=$appID";
$req_url .= "&query=$query";
$req_url .= "&language=$language";

// Make the request
$yahoo_response = file_get_contents($req_url);

// Parse the XML
$xml = simplexml_load_string($yahoo_response);

// Initialize results counter
$i = 0;
?>
<html>

<body>
<h2>Yahoo! Search Results</h2>
<ol>
<?php
// Loop through the items returned, printing them out
foreach ($xml->Result as $result) {
 $i++;
 $title = $result->Title;
 $summary = $result->Summary;
 $summary = preg_replace("/</i","&lt;",$summary);
 $clickurl = $result->ClickUrl;
 $url = $result->Url;
 print "<li><div style=\"margin-bottom:15px;\">";
 print "<a href=\"$clickurl\">$title</a><br />";
 print "$summary<br />";
 print "<cite>$url</cite></div></li>\n";

}
?>
</ol>
-- Results Powered by Yahoo!
</body>
</html>

This script uses the value of the querystring variable p to build a Yahoo! Web Search request URL and fetches the XML with the file_get_contents() function. Once the script has the XML in the $yahoo_response string, it calls the SimpleXML function simplexml_load_string( ), which parses the XML and makes the data available to PHP as an object. Finally, the script loops through the objects, using print to send the data to the browser.

To run the script, point your web browser to the location of the script on your server and add the querystring variable p:
http://example.com/yahoo_search.php?p=insert word

You can add multiple words by encoding spaces for URLs. For example, here's the search string for "PHP encoding":
http://example.com/yahoo_search.php?p=PHP%20encoding
 
As the results indicate, you can read the official documentation for PHP's 
SimpleXML function at http://www.php.net/simplexml. With this function, working with 
Yahoo! Search Web Services data is much more 
intuitive than with earlier versions of PHP. 



Add a Yahoo! Bookmark with One Click

Speed up the process of adding sites to your Yahoo! Bookmarks with a browser bookmark and a bit of JavaScript.
Yahoo! Bookmarks are an easy way to share a list of web sites across several computers. If you have a set of sites you like to visit from home, the office, a friend's house, or any other place you might find yourself in front of a computer, they'll always be just a few clicks away at your Yahoo! account, instead of trapped inside your browser at home.

Unfortunately, setting up this list of sites for the first time can be time-consuming. After logging into My Yahoo!, you must find your bookmarks (usually in the upper-right corner); click Add; copy and paste the site URL, name, and any comments into the form; and click the Save button. This might not sound too labor intensive, but it amounts to quite a few steps if you're adding more than a few sites.
If you've installed the Yahoo! Toolbar, you might have already experienced the joy of one-click Yahoo! Bookmarks. On any web page, you can click the Add Bookmark button to add a site. From then on, the site will be available at your Yahoo! Bookmarks. If you don't want to install the Yahoo! Toolbar (to save browser real estate) but still want the convenience of adding bookmarks, you can build your own JavaScript bookmarklet and add it to your browser's bookmarks toolbar to get the same one-click effect.


A bookmarklet is a bit of JavaScript code stored in a web browser bookmark. Bookmarklets give you a way to run code that can interact with the current page in the browser. For example, bookmarklets can change the size and colors of fonts on a page, open new browser windows, or extract information about the current page. With bookmarklets, you're in control of the script, because it runs when you click the bookmark.
In order to implement this hack, the only thing you'll need is a browser that has bookmarks and understands JavaScript. Don't worry, that covers just about every web browser!

the functioning bookmarklet code will be formatted without linebreaks or spaces.

// Dissected JavaScript bookmarklet for one-click Yahoo! Bookmarks
 
 // Set d to the document object as a shortcut
 var d = document;

 // Set t to the currently selected text, if available
 var t = d.selection?d.selection.createRange( ).text:d.getSelection( );

 // Build the URL that will add a bookmark to Yahoo! Bookmarks
 var url = 'http://e.my.yahoo.com/config/edit_bookmark?';
 url += '.src=bookmarks&';
 url += '.done=http%253a%2F%2Fe.my.yahoo.com/config/set_bookmark&';
 url += '.folder=1&';
 url += '.action=ab&';
 url += '.display=1&';
 url += '.protocol=http%3A%2F%2F&';

 // include the URL of the current page
 url += '.url='+escape(d.location.href)+'&';

 // include the title of the current page
 url += '.name='+escape(d.title)+'&';

 // include any selected text of the current page as a comment
 url += '.comment='+escape(t)+'&';
 url += '.save=+Save+';

 // open a new window to add the bookmark and show the results
 window.open(url,
    '_blank',
    'width=640,height=440,status=yes,resizable=yes,scrollbars=yes');

Take a look at the bold querystring variables in the code. These are the primary elements of the Yahoo! URL we're concerned with. Here's a quick look at what each variable represents:

.done
The URL to display after the action is completed.

.folder
The ID of the folder in which you'd like the bookmark to be included. If you don't have multiple folders, use 1, which is the default.

.url
The URL of the site you're adding as a bookmark.

.name
The name of the site you're adding as a bookmark.

.comment
Some arbitrary text that is associated with the bookmark.



Samsung Galaxy K zoom

Samsung has unveiled the Galaxy K zoom cameraphone a week ago. It's a successor of the Galaxy S4 zoom from last year and couples the Galaxy S5 design with a 20.7MP camera with 10x optical zoom. Samsung has already detailed the official pricing and availability - the Galaxy K zoom should hit the shelves across Europe in mid-May for €499.


As it turns out the retail price for Germany will be higher, though. Samsung has just issued a press release for Germany, where it says the official price for the Galaxy K zoom is €519. The availability stays the same - mid-May. This is quite interesting. Germany is the only EU country (so far), where the Sony Xperia Z2 costs less - €679 instead of €699.
Samsung galaxy note-3

Nokia HERE apps for Android and iOS


There's strong evidence to believe that Nokia plans on releasing their collection of HERE apps for Android and iOS. The Finnish company released two job postings that call for mobile software engineers who have experience in iOS and Android application development.

 Check out the postings below: "As an Android / iOS developer you will be a key member of our growing mobile engineering team, developing industry-leading mobile SDKs / applications. This is an experienced position that requires fluency in the latest Java capabilities and improvements in the Android and iOS  SDK. The ideal candidate is motivated to explore and deliver the best possible solutions to our customers The ideal candidate will have experience shipping one or more Android / iOS apps, currently on Google Play / Apple Store. You should have a strong passion for technology as evidenced by your personal projects that demonstrate your aptitude for superior engineering and strong customer-centric product sense. You should enjoy working outside the comfort zone and love to learn new technologies.


The position will be based in Berlin / Frankfurt and will report to the Tem Lead Development team Mobile SKDs for Business, HERE Platform for Business." There's also a second job posting that calls for a specific Android mobile developer: "We are now looking for a Mobile App Developer (Android) to join our team. In this role, you will be responsible for: •Working directly with developers, product management and UX Design to conceptualize, build, test and deliver mobile products •Deliver across the entire app life cycle -concept, design, build, deploy, test, release to app stores and support •Build prototypes at tech scoping stage of projects •Working along the web developers to create and maintain a robust framework to support the apps •Working with the front end developers to build the interface with focus on usability features •Keep up to date on the latest industry trends in the mobile technologies •Explain technologies and solutions to technical and non-technical stakeholders" From the two job descriptions, it seems that Nokia plans on bringing the entire HERE experience to both Android and iOS, and not just their navigation and maps software. This is a smart move on Nokia's part, as the more users they're able to get invested in their services,

Samsung Galaxy Note 3

An updated Samsung catalog for South Korea has revealed two new color choices for the Samsung Galaxy Note 3 Neo. The phablet will soon hit its home market in pink and red flavors, but there's no further information on when exactly that will happen. It also highly probable for the new hues to be part of an upcoming Galaxy Note 3 Neo La Fleur line-up. Sadly, we don't know if the new color choices will make it outside South Korea, but history has proved they'll eventually launch internationally, too.

 The Samsung Galaxy Note 3 Neo launched in the last day of January this year. It packs a 5.5" 720p Super AMOLED display, 2GB of RAM, 16GB of built-in memory. It's powered by a hexa-core chipset, which consists of two 1.7GHz Cortex-A15 cores and four 1.3GHz Cortex A7 cores, while the HSPA+ features a 1.6GHz quad-core Cortex-A7 CPU.

Samsung Galaxy S5 Developer Edition

Samsung has released a Developer Edition of the Galaxy S5 smartphone and it is available exclusively on Verizon. The difference between this model and the standard model is that the Developer Edition comes with an unlocked bootloader, facilitating flashing custom ROMs on the device.


 The phone is being sold for $599 contract free, although the phone is still locked to Verizon's network. The Developer Edition will only be available in 16GB configuration in Charcoal Black.