MARKET YOUR WEBSITE
PMA09:20
MARKET YOUR WEBSITE
-
Was your article especially well-written? Was your informationhitting on a recent trend? Were you offering a great product?Knowing the reason for this might inspire some changes onthe page, or give you ideas for new material elsewhere on your site.
-
and check out what page they land on when coming fromGoogle—and think about the first impression you're makingon them. As the saying goes, your visitors spend 99% of theiremphasize a link, or add an introductory blurbsomewhere on the side.
-
statistics to find out who linked to you, and track the sourceof the traffic to find commentary and feedback about your site.React to the feedback, if needed.
-
Perhaps your home page address received amention in a radio or TV show!
-
to find out why there's such a big time difference. Also,use your server log to trace the path they took throughyour site, retracing your visitors' steps.
-
there's a server script with suboptimal performance that needs rewriting?
-
2 they didn't expect, so check it out and fix it if needed.
-
from checking stats, and get the word out again—by contacting webmasters, talking to readers or customers,getting involved with the community, or adding greatcontent to your site.
to do a good job, whether you consider yourself a
webmaster,
an e-merchant, a news blogger, a web artist, or anything else
or
in-between. On the following pages, you will find hacks
that could improve your
mastering of this tool—and thus, your
site. Additionally, there are tips and
tricks that can help you
market your site.
Getting Started with Google
Analytics
To log in to Google Analytics http://www.google.com/analytics,
view a report for one of your web sites. What if you aren't
happy
with this selection?
displays a map overlay and a visitors overview
box, among
others. But what if you already have a good handle on where
your
visitors come from, making the high-level information
contained on the map
overlay redundant?
do so is to grab a box and drag and drop it elsewhere on
the page.
You can also click the X in the upper-right corner of a box to
make
the element disappear. If you want to add new boxes,
instead, first navigate to
the Analytics page containing the
information you're interested in, such as
Content.
Generating a PDF document-PHP
PMA23:15
Generating a PDF document
<?php
// These values are in points (1/72nd of an inch) $fontsize = 72; // 1 inch high letters $page_height = 612; // 8.5 inch high page $page_width = 792; // 11 inch wide page // Use a default message if none is supplied if (strlen(trim($_GET['message']))) { $message = trim($_GET['message']); } else { $message = 'Generate a PDF!'; } // Create a new PDF document in memory $pdf = pdf_new( ); pdf_open_file($pdf, ''); // Add a 11"x8.5" page to the document pdf_begin_page($pdf, $page_width, $page_height); // Select the Helvetica font at 72 points $font = pdf_findfont($pdf, "Helvetica", "winansi", 0); pdf_setfont($pdf, $font, $fontsize); // Display the message centered on the page pdf_show_boxed($pdf, $message, 0, ($page_height-$fontsize)/2, $page_width, $fontsize, 'center'); // End the page and the document pdf_end_page($pdf); pdf_close($pdf); // Get the contents of the document and delete it from memory $pdf_doc = pdf_get_buffer($pdf); pdf_delete($pdf); // Send appropriate headers and the document contents header('Content-Type: application/pdf'); header('Content-Length: ' . strlen($pdf_doc)); print $pdf_doc;
?>
the functions in the PDF extension.
This extension depends on the PDFLib
library that is available at
http://www.pdflibrary.com.
The CLibPDF extension also generates
PDF files,
PHP and Javascript Variables
PMA14:00
Variables
To define a variable in PHP, you’d write:
// PHP
$n = 1;
The equivalent in JavaScript is:
// JavaScript
var n = 1;
// PHP
$n = 1;
The equivalent in JavaScript is:
// JavaScript
var n = 1;
There’s no dollar sign, just the name of the variable.
types because the type is derived from the value.
You use varfor all types.
If you need a numeric type, you give your variable a
numeric value. The same applies
to booleans and strings:
var n = 1; // number
var b = true; // boolean
var s = "hello"; // string
You have the option of declaring a variable without
initializing it with a value. In such cases, the variable
is assigned the special value undefined:
var a;
a; // `a` has the special value `undefined`
Redeclaring an existing variable doesn’t set the variable
value back to undefined:
var a = 1;
var a;
// `a` is still 1
You can declare and optionally initialize with a
value several variables with one var statement as
long as you separate them with a comma and
end with a semicolon:
var pi = 3.14,
yeps = true,
nopes,
hi = "hello",
wrrrld = "world";
Technically, var is optional. But unless the variable
was defined higher up in the scope chain , if youskip
var, you end up with a global variable.
And you’ve learned, prob‐ably the hard way, that
global namespace pollution is a sin. Additionally,
there are some subtle differences if you declare
a global variable with and without var.
To cut a long story short, resist this temptation and
always use varto declare your variables.
Multimedia Video Formats
PMA13:52
The AVI Format
The AVI Audio Video Interleave format was developedby 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 themost 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 theInternet 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
PMA13:15
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.
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.
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.
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.
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.
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.
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.
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.
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.
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://
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.
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.
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.
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
PMA13:05
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.
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
PMA13:01
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.
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
PMA12:59
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.
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?
PMA12:50
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.
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.