gnoan.blogspot.com daily 1 Global Nepal Online Academy Global Nepal Online Acedemy googlec4b8e18bfb5e32db.html

GNOA is a Complete Online Education Site.

Latest Posts

Friday, April 22, 2016

Examples of applications of Perl / PHP

Examples of applications of Perl / PHP

Nor PHP or Perl the best for all web tasks:
• Horses for courses
Perl : heavy CGI calculations , for example,
• Search engines ,
• data processing ,
• heavy Access File etc.
• heavy database Access / Usage
PHP: better suited for dynamic HTML , such
• process simple form
• creating a complex site integration
E.g. connected to a database - easy database connectivity.

Including PHP in a web
There are four ways, including PHP during a web page

<?php echo("Hello world!"); ?>
<script language = "php">
echo("Hello world");
</script>
<? echo("Hello world"); ?>
<% echo("Hello world"); %>

You can also use print instead of echo
• method1 is clear and unambiguous- My preferred method
• method 2 is useful in environments containing mixed scripting
languages in the same HTML file.
• method 3 and 4 depending on the server configuration

What happens when the page loads?
When the script runs:
• The code is executed and
• The tag is replaced by the output ( '' hello world '') in
examples above.
• Extra is exactly where the PHP compared to HTML.
- If you view the source of  PHP and HTML pages that you do not see PHP.
• can more than a PHP tag in a single web page.

A simple PHP script Preview
Here is the first full PHP script is embedded in HTML:
• we create a level one header with the PHP output text.
• This file is called hello.php:
<html>
<head>
<title>Hello world!</title>
</head>
<body>
<h1><?php echo("Hello world"); ?></h1>
<h1><?php print("This prints the same thing!"); ?></h1>
</body>
<html>

Basic PHP
Comments
PHP supports three types of reactions:
1. Shell style comments - indicated #This is a comment
2. C ++ style comments - called this is A COMMENT
3. C -style comments - marked / * ALL THIS commented! * /

variables
Variables start with the $ symbol (such as Perl) .
E.g.:
$myInteger = 3;
$myString = "Hello world";
$myFloat = 3.145;

PHP data types
data types are not explicitly defined :
• The variable type is determined by the command.
• several Perl.
• The string can be Clear with single  and double quotes.
- Rules for String like as in Perl.
• PHP has a boolean type :
Defined as false
- an integer or a value of 0 or float
- The keyword false
- The empty string '' or string ' ' 0 ''
- an empty array or object
- The NULL value
Defined as real
- All non-zero integer or float value
- The key to true
• standard operators with the standard syntax used variables

Thursday, April 21, 2016

Three main applications of PHP

Three main applications of PHP
Server - side scripting -This is the most traditional and main target
the field for PHP are need three things to make this work :-

• The PHP parser CGI or server module.
• a web server -needs a connected PHP installation
• The web browser - Access PHP document pages by URL
Command line scripting -You can run a PHP script without
a server or browser. you only would like the PHP parser to use it this
way. These scripts can also be used for simple word processing
tasks similar to Perl
Writing client-side GUI applications -PHP is probably not the very
the best language to write windowing applications, but PHP.
GTK PHP Graphics Tool Kit can be used to write such programs.
Not addressed in this course.

PHP v Perl
Let's compare Perl and PHP first
Perl :
• interpreted language optimized to process text files - Ideal for
CGI usage .
• using a Perl script as a CGI means that once an online form
Calls to process the script will load the web server of the Perl
script and the output pipe of the script to the user, on the
Web browser .
• simple syntax similar to C
• including advanced functionality through a large number of packets
( CPAN )
PHP v Perl ( Cont. )
PHP:
• Server side scripting language implanted in HTML pages .
• Handled by the web server if the HTML page is loaded.
• PHP code included in special HTML tags that decompose by
the Web server.
• Syntax is different from Perl ( but not much else )
• PHP also has some very advanced features.


The advantages of Perl / PHP

Perl has many advantages:
• general purpose language - functions to do almost anything.
• Perl modules that can be downloaded and loaded into a Perl
script.
• Scripts can also be made to be processed by the web server and
by a user of the shell (NOT WEB-BASED ) , if necessary.

The advantages of Perl / PHP ( Cont. )
PHP also has some advantages :
• it is included in HTML pages .
This means that:
- all your work can be done in the same folder , and
- a single file can contain HTML and PHP code
- much easier to edit / maintenance of web pages.
- This improves tasks such
-Dynamic page processing.
- Checking and doing simple HTML form based on tasks.
- database connectivity


Disadvantages of Perl / PHP
• Management of simple scripts is harder than PHP:
- Scripts should be loaded individually from the hypertext markup language pages.
- typically scripts also be stored in a special folder - eg cgi-lib.pl,
scripts, so do not need to load a separate location.
• PHP integrates well into HTML files - • If the PHP code complex can lead to a complex
• highly suitable for simple dynamic web processing,
mixture of code on the page. Disadvantages of Perl / PHP (Cont.) PHP: • Not so great for more complex tasks
* Not as general purpose as Perl.
- harder to parse / understand and maintain much code mixed with web page (see above). * PHP requires that the server is configured to parse PHP files.
they should not be used in files which do not have to be processed.
* Perl similar but both now globaly supported. * also, PHP files must decompose by the server at any load, so * Perl similar but both slightly less overhead. Examples of applications of Perl / PHP
• heavy database Access / Usage
Nor PHP or Perl the best for all web tasks: * Horses for courses Perl: heavy CGI calculations, for example, • Search engines, • data processing, • heavy Access File etc. PHP: better suited for dynamic html, such • process simple form
E.g. a database-connected simple database connectivity.
• creating a complex site integration

Introduction of PHP

PHP started as a small open source project that evolved as more and more people
found out how useful it was. Rasmus Lerdorf released the first form of PHP way back
in 1994.
1. PHP is a recursive acronym for "PHP: hypertext Preprocessor".
2. PHP is a server-side scripting language that is embedded in HTML. it is used to
manage dynamic content, databases, session tracking, even build entire eCommerce
sites.
3. it is integrated with a number of popular databases, including MySQL, Oracle, Sybase and Microsoft SQL Server.
4. PHP is pleasantly zippy in its execution, especially when collected an  Apache
module on the UNIX.
 The Mysql server once started and executes even very
complex queries with immense result sets in record-setting time.
5. PHP supports a large number of major protocols such as POP3 and  IMAP. PHP4 added support for Java spread object styles making n-tier development a possibility for the first time.
6. PHP is forgiving: PHP is forgiving: PHP language stabs to be as merciful
7. PHP Syntax is C-Like.


PHP Features
The main features of PHP are:
• PHP is web-specific and open source
• Scripts are embedded into static hypertext markup language files
• fast execution of scripts
• fast access to the database tier of applications
• Supported by most web server and OS.
• for IMAP, NNTP, SMTP and POP3. 
• Supports many DBM
• Supports many DBMS libraries available for UNIX system DBM,
MySQL, Oracle,
• Dynamic Output any text, hypertext markup language XHTML and any other XML file.
• also Dynamic Output images, pdf file, and even Flash movies
• Text processing features, from the POSIX Extended or Perl regular expressions
to parsing XML document.
• a fully featured programming language suitable for complex system
development











What can PHP do?
As we have just aforementioned PHP is a fully featured programming language
so it will do just about everything.
However, it is best suited and is mainly focused on server-side
scripting so {you can|you'll|you'll be able to} do anything any other CGI program can do
such as:
• Collect form data,
• Generate dynamic page content,
• Send & receive cookies.
• But PHP can do ample extra than we have not got time to deal with
here
– Please refer to recommended course book.
– websites: http://www.php.org,
http://www.php-scripts.com, http://php.resourceindex.com,
and others.

PHP support and installation.
PHP will be used on all major OS :
• Linux
• many UNIX operating system variants ( including power unit - UX , Solaris, and OpenBSD )
Microsoft Windows ,
• Mac OS X
• Windows
• RISC OS ,
• and probably others.
PHP already installed on the varsity network

Tuesday, April 19, 2016

What is the Google Adsense?

Google Adsense is an application in which organizations can show google commercials on internet 
websites and earn revenue from hits that generate traffic for the google SERPs. Google AdSense represents companies of all sizes worldwide in additional than one languages. Adsense is a refinement and growth of the idea in the back of banner -advert sharing arrangements that have been in use for years.
Adsense provides targeted advertisements to members' net websites. Google ask for containers could also be located on net pages, producing text commercials focused on going looking outcomes produced by way of visitors' seek to enter. The google algorithms are designed to interpret context in such a way that besides the point effects are discarded and only the ones maximum probable to provide revenue are added.
Google evaluations ads using language filters and expert linguists to prevent the display of inappropriate text or content material and to ensure that every one material conforms to professional editorial and moral requirements. Aggressive classified ads may be blocked and default advertisements can be created or selected.

In case you are a beginner to blogging and to the online global in standard, you may have heard approximately google Adsense or visible the AdSense ads while you searched something on google and visited an internet site that is using AdSense.

Adsense highlights:
1. It's far owned by way of google.
2. It generates a massive a part of google’s income.
3. Adsense ads are proven in the websites that participate in the google AdSense software (those are       known as the AdSense publishers).
4. Adsense is a platform for publishers i.E. the ones human beings that have a website and need to  show google ads. The machine for advertisers i.E folks that wish to promote it their products or           services in google is google AdWords. See additionally: suggestions for beginners to AdWords.
5. Adsense advertisements can be shown on cellular gadgets as nicely.
6. Adsense works with EPC (earnings per click) and CPC (cost per click on). Publishers will get paid         for clicks on advertisements acting in their websites.
7. Currently (Feb 2015), AdSense publishers receive 68 of the click fee and google 32nd. which              suggests that if a publicist will pay $1 for each click on his advertisements, the AdSense writer           will get $zero.68 and google $0.32
8. Every person (above 18) with an internet site that meets the google Adsense hints can take part in the  program.
9. Adsense has strict guidelines that have to not be violated for any cause. It's miles your obligation          as an AdSense publisher to realize and comply with the regulations.
10. absence has some of the products appropriate for desktop websites, movies, video games, cellular       apps and extra.
11.  Adsense advertisements could have some of codecs and sizes consisting of text and snapshots.
12 . Adsense publishers get paid monthly by the method of google.

How does google Adsense work?
Now that you have a better concept of what is Adsense, permit's seen the way it works in a step-by way of step mode.
Software manner


#1 – produce Adsense account
Step one is to visit http://www.Google.Com/adsense and create an account. Your AdSense account is related to a google account like the one you operate to log in to Gmail, youtube, and many others.


#2 – add Adsense on your website
Before being common to the program, google wishes to test that your internet site adheres to the sense recommendations. To skip this step, you want to add Adsense code on your website so that the google crawler can access your internet site’s content material.
That is a completely crucial step because as we will going to} see beneath there are instances that your utility might not be prevalent.
In the course of this step and until you are absolutely approved, AdSense ads are not proven in your internet site however they're hidden by way of default. in case your software is commonplace, commercials will begin to expose and you'll receive a commission for the clicks.
Have in thoughts that that is an as soon as off method as a result of when you are customary as an AdSense writer, you may run AdSense on any website you want (supplied of direction that it is not violating any sense regulations).

#three – setup your charge info
Gmail
The subsequent and final procedure in the software technique is to add your fee information so you acquire fee and the stop of the month and once you handed the minimum threshold of $a hundred. Please observe that earlier than receiving any cash from Adsense, google will verify your postal address by using sending you can Incase with the validation code so guarantee that the info so guarantees that the info in code so ensures that the info you provide for your postal cope with are accurate.
Ad placement

In which do the commercials appear?
Whilst you are a confirmed AdSense user, you could log in to your dashboard and create new ad units. once developing an advert unit you will pick out the dimensions (for instance 336×280), type (snapshots and text), fashion (textual content and border colorings) and then you will be given a code (javascript) to enter to your website where you want the precise ad to appear. within the space furnished google may additionally decide to reveal one or greater advertisements.
What variety of AdSense advertisements are you able to display in step with a web page.
In any given web page you could display up to a few Adsense devices.


Wherein should I region my advertisements?
The overall rule is to the area the advertisements wherein they may be seen through your visitors but without violating any sense or google webmaster first-rate recommendations.

You may use those easy policies:
1. Area 1 advert unit above the fold within the most important content of the website (now not sidebar)
2. Location 1 adverts unit in the sidebar. The one hundred sixty×600 is very good for putting in the sidebar
3. Region 1 advert unit at the crease of your web page or article (preferably in the foremost content material vicinity)

Sunday, April 17, 2016

What is a HTML?

What is a HTML?

HTML stands for  Hypertext Markup Language. HTML code is the major language of the Internet's World Wide internet. websites and web pages are written in HTML code. With markup language code and therefore the world wide internet, you have got the power to collect text, pictures, sounds, and links... beat one place! hypertext markup language code files ar plain text files, in order that they can be composed and edited on any sort of computer... Windows, Mac, UNIX, whatever.
HTML is hypertext markup language. it is a language for document storage and retrieval, in fact, the world Wide internet is really nothing more than a document storage and retrieval system. 

Hypertext is text with links. On the web, if a word is underlined or a unique color, you recognize you'll be able to click on it and it will take you to a different document. that is called a hypertext link. hypertext is text (meaning lines of characters that you read) with links included. 

A markup system is a method of specifying things in the text that are not really part of the text itself. for instance, in a markup document /B+ may turn on bold characters, /B- might flip them off. The / is a signal that follows is not part of the text but a command to a program that displays the text. 

That's how hypertext markup language documents work. the actual document is just text, but with legion commands to incorporate picture change font, size, spacing and  whatever. This is all interpreted in the page you actually see. that is the markup language part of it.
HTML  is the customary markup language used to create sites.HTML is written within the kind of markup language parts consisting of tags b in angle brackets (like &lt;html&gt;).HTML is the "hidden" code that helps united states communicate with other on the world Wide Web (www). What you see when you view a page on the internet is your browserAnalysis of hypertext markup language. to see the HTML code of a page on the web, merely click "View" within the prime menu of your browser and choose "Source". it is selected with .html or .htm extension.

Summary of hypertext markup language
HTML is a language for describing websites. 
HTML stands for Hypertext markup language.
A markup language is a set of markup tags 
HTML is a nomenclature 
HTML documents are also called web pages.
HTML documents contain html tags and plain text 
The tags describe document content
<!DOCTYPE html>
<head>
<title>The first web</title>
</head>
<body>
</body>
</html>

Example Explained 
The DOCTYPE declaration defines the document type 
<!DOCTYPE html>
<html>

Note The <!DOCTYPE html>; declaration is the doctype for HTML5.

HTML Tags 
HTML markup tags are typically called HTML tags.
HTML tags are keywords (tag names) surrounded by angle bracket like <html>.
HTML tags normally come in pair like <p> and </p>
The first tag in a pair is the start tag. The second tags are the end tag.
The end tag is written like the begin tag with a slash before the tag name
Start and finish tags also are known as gap tags and shutting tags



HTML elements 
In HTML, most elements are written with a start tag e.g  <p> and the end tag e.g  </p> with the content in between:
<p>. this is a paragraph </p> Web Browser.

The purpose of a web browser (Google Chrome, internet explorer, Firefox, and Safari) is to read.HTML documents and display them as sites.


Google

100