Monday, December 24, 2018

Web Programming Using PHP - Unit 1 for B.C.A.,B.Sc.(IT) and all IT Students


--------------------------------------------------------------------------------------------------------------------------

Prepared By : Uday Shah (HOD - IT)
Contact No : 7600044051
E-Mail : rupareleducation@gmail.com



Web programming using PHP


·   Web programming refers to the writing, markup and coding involved in Web development,
·    Which includes Web content, Web client and server scripting and network security. The most common languages used for Web programming are XML, HTML, JavaScript, Perl 5 and PHP. Web programming is different from just programming, which requires inter disciplinary knowledge on the application area, client and server scripting, and database technology.

Q-1:  Explain Webpage:
·     This Documents are written in HTML (Hypertext Markup Language) and it is translated by Web Browser.
·    Web page is a web document which consists of text, graphics and media. Web page is created with html tags or any mark up language. It is suitable for any browser and word wide web.
·        Web pages can either be static or dynamic.
·     The term webpage is used when talking about scripting language, they have different extension like .html, .htm etc.
·        Web browser display a web page on a monitor or mobile device.
·     A webpage is a documents, typically written in plain text with formatting instructions of Hypertext Markup Language.

Q-2:  Explain Website:         
·        A set of related WebPages will create a website, the web pages are created could be accessed using website from a simple uniform resource locator (URL), which is referred as web addresses.
·  Web site can be categories as per requirement such categories include, education, social networking, information, organization search engine etc.

Example of web sites is
·        www.google.com          -->     Which is search engine
·        www.w3school.com      -->     Which is education website
·        www.fridow.com          -->     Which is social networking site.

Q-3: What is static website.
·    Static website: A website having static page & display the same information to all users is called static website. Static website is made up with simple HTML.
·     A static website contains information that does not change. It remains the same, or static for every viewer of the site.
·     A static website is one that has web pages stored on the server in the format that is sent to a client web browser. It is primarily coded in HTML.

Advantages:
·        Quick to develop
·        Cheap to develop
·        Cheap to host.
Disadvantage:
·        => Requires web development expertise to update site
·        => Site not as useful for the user
·        => content can get static

Q-4: Explain Dynamic web.
·        A dynamic website is one that changes or customizes itself frequently and automatically based on certain criteria.
·      A website that have interaction with user and change information with each user is called dynamic website. Dynamic website is made with HTML, DHTML, CSS Client side scripting, server side scripting.
·   A dynamic website contains information that changes, depending on the viewer of the site, the time of the day, the time zone, the native language of the country the viewer is in or many other factors.
Advantages:
·        Much more functional website
·        Much easier to update
·        New content brings people back to the site and helps in the search engines.
·        Can work as a system to allow staff or users to collaborate.

Disadvantages:
·        Slower/ more expensive
·        Hosting costs a little more.

Q-5: Explain Scripting language.
·   A scripting language or script language is a programming language that supports the writing of scripts, programs written for a special runtime environment that can interpret and automate the execution of tasks which could be executed one by one  human operator.
·        There are two types of scripting language.
·    Client Scripting Language: Client side scripting generally refers to the class of computer programs on the web that are executed client side by the user’s web browser.
·     Client side operations are performed on the visitors computer by the users internet browser to display the web page as the data is received from the server.
·     Client side scripting is a script (javascript,VB script) that is executed by the browser that resides at the user computer.

·        Server Scripting Language.
·   Server side scripting on the other hand used the language that can be understood by the server only, the work of server is process the request which is send by the client.
·      After the compilation of the process the server gives back the response the client.
·   Server can understand both the client side language as well as its own language.
·       There are many web servers which can understand the server side coding.

Q-5: Introduce to other server side scripting language.
·        Various kind of server language which help to process the client request.

1.PHP:
·        PHP stands for hyper text preprocessor and earlier standard out as personal home page. PHP is similar in many way to Asp as it is an interpreted scripting language.
·      PHP as more of a C / Javascript syntax then Asp standard VB script. PHP is open source software developed by Rasmus Lerdorf.

2. ASP:
·      ASP stands for Active Server Pages. It is a technology built into IIS. ASP is more a platform then a language. You can write ASP pages in VB script, javascript or even perl or python.
·    You can get start with ASP by initially IIS in windows 2000 or in         windows 1998.

3. ASP.net:
·    ASP.net is the web part of Microsoft new .net frame work. It is different enough from ASP to its own mechanism like cold fusion. ASP.net page is compiled on first execution rather then interpreted.
                            
4.Cold fusion:
·        It is a tag base language created by macromedia. It is run as a script server and interact with the web server. The language is tag based that means it most of the interaction is placed inside html style tags.      
·     Cold fusion server runs on most platform, however licenses is not cheap. The first time you run a cold fusion script the execution is compile so any of the execution are very quick.

5.JSP:
·   JSP is recognized as Java Server Pages. It is a technology for creating dynamic web pages based on html, xml or other types of document. It came into existence in 1999 by sun micro system.
Q-6: Explain Web servers:
·   A Web server can be referred as hardware or software , which helps to delivered website content to user with access of internet.
·      The main functionality of web server is the receiver the request send by the client in html format, process the request and give back response to client.
·        There are basically two types of web servers.

·    IIS: IIS is known as internet information services. Which is http web server. IIS is a software application the creater is Microsoft for use with Microsoft windows.
·       It is supported by Http, Https, FTP , Ftps and SMTP protocol. It is a part of windows server family.
·  Once the services of IIS is on it can be accessed using Microsoft management console, a component windows 2000. This web server is widely used when website is created using Asp.net.

·    Apache: As we knows that there is a webserver requirement for PHP is apache.
·    The name apache derived from the word “Patchy” that the apache developer used to describe early version of the software.
·        Apache is the http web server , which is developed and maintain by apache software foundation.
·     It is available for various operating systems like unix, linux, windows-xp etc.
·        Apache applications are widely used on unix operating system.
·        It is  characterized as a open source software like PHP, Mysql etc…..
·     Apache is the application which understand the PHP, JSP etc. like language and is used to process the code.


Q-7: Explain Web Hosting
·   A web hosting service is a kind of internet hosting service which allow organization companies and individual to make their website live via the WWW.
·     Web hosting companies provide some space on owned or leased server to their clients. They also provide data center space for other servers called collocation. Also known as Housing in Latin America.
·    The server for web hosting is referred to as hardware with a very large space and configuration.
·    Most hosting providers provide Linux based web hosting which offers a wide range of different software. A typical configuration for a Linux server is the LAMP platform Linux, Apache, MYSQL and PHP/Perl/Python.

·        There are different types of hosting servers as under
·        Free web hosting
·        Shared web hosting
·        Reseller web hosting
·        virtual Dedicated server
·        Dedicated Hosting Service


Q-8: Explain Virtual Host
·        The term virtual Host refers to running more than one web site on a single machine. Virtual host can be “IP based” , it means that you have a different IP addresses for every web site, or “name-based”, means that you have multiple names running on each IP address.
·    IP based virtual host: For this type of configuration where more than one website referring the server than runs Apache with different IP addresses, the physical server should have respectively different IP address configuration.
·   Name based virtual host: In this configuration when apache web server receives a request, it looks for the hostname in the HTTP header, and depending on the host name, it serves different websites.

Q-9: Explain Multi Homing:
·      Multi homing describes a computer host that has multiple IP addresses to connect networks. A multi home’s host is physically connected to multiple data links that can be on the same or different networks.
·  Using the stream control Transmission Protocol(SCTP), multi homing allows a single SCTP to support multiple IP addresses by which connection is more likely to survive a network failure.
·   Multi homing means that redundant local area networks can be used to support local access. Multi homing is commonly used in web management for load balancing, redundancy, and disaster recovery.

Q-10: Explain Distributed Server
·   Large networks have multiple servers. The servers are often distributed around the network with a server on every subnet. This improves booting efficiency. Implementation distributed servers requires a technique for maintaining central control and coordinating configuration information among the servers.
·     The client-server model is a distributed application structure in computing that partitions tasks or workloads between the providers of a resources or service called servers and service requesters  called clients.

Q.11: Explain Document Root:
·   The document root informs where all PHP script runs from many pages scripted using PHP seem to assume that the script is running under Apache. Execution of PHP possible with IIS on a windows platform.
·  Apache provides an environment variable called DOCUMENT_ROOT while IIS does not. This variable tells the code about where the web pages are delivered from and may have a value something like this:
·        /usr/local/apache/share/htdocs
·        In Xampp control panel it is
·        /xampp/htdocs
·        IIS and apache tell the name and location of the currently executing script. That information is in an environment variable called SCRIPT_NAME.
·        Explain PHP ini (Initialization file)
·    PHP.ini is a configuration file that is used to customize behavior of PHP during run time. The setting like uploading directory, registering global variables, display errors, log errors, max uploading size setting, maximum time to execute a script and such other configuration is written in this file. Ini means Initialization file.
·   When PHP server starts up it looks for PHP.ini file first to load various values for setting. If any changes in PHP.ini then you need to restart Apache server from xampp control panel to check the changes is affected. The file is found at C:\xampp\php\php.ini
·        Explain PHP htaccess
·        .htaccess is a configuration file for use on web servers running the Apache web server software. When an .htaccess file
·     is placed in a directory which is in turn ‘loaded via the Apache web server’, then the .htaccess file is detected and executed by the Apache web server software. HTACCESS file can be placed in the various directories of your web server to provide specific handling of various Apache web server options for that directory. Apache web servers have two main places for configuration information are httpd config files and per-directory .htaccess files.

:: Best Of Luck ::

https://myshopprime.com/uday.shah3/shop

Please give your comment and Share it... Thank You