SAX parser has used to parse the xml file and better for memory management than sample xml parser and DOM. It does not keep any data in memory so it can be used for very large files. Following example will show how to get data from xml by using SAX API.
SAX.xml
XML should be as follows −
<?xml...
Monday, 31 July 2017
Friday, 28 July 2017
PHP - XML Introduction
What is XML?
XML is a mark-up language to share the data across the web, XML is for both human read-able and machine read-able. Example of share-able xmls are RSS Feeds. XML parsers are useful to read and update the data by using web browsers.
Types of XML
Tree based
Event based
XML Parse Extensions
XML...
Thursday, 27 July 2017
PHP - Simple XML
The simple XML parser
The simple XML parser is used to parse Name, attributes and textual content.
The simple XML functions are shown below −
simplexml_load_file()
This function accepts file path as a first parameter and it is mandatory.
simplexml_load_file(($fileName,$class,$options,$ns,$is_prefix)
simplexml_load_string()
This...
Wednesday, 26 July 2017
PHP - Ajax RSS Feed Example
RSS
Really Simple Syndication is used to publish often updated information from website like audio, video, images, etc. We can integrate RSS feeds to a website by using Ajax and php. This code demonstrates how to show RSS feeds in our site.
Index.html
Index page should be as follows −
<html>
...
Tuesday, 25 July 2017
PHP - Ajax Auto Complete Search
Auto Complete Search
The Auto complete search box provides the suggestions when you enter data into the field. Here we are using xml to call auto complete suggestions. The below example demonstrate, How to use auto complete text box using with php.
Index page
Index page should be as follows −
<html>
...
Monday, 24 July 2017
PHP - Ajax XML Parser
Ajax XML Example
Using with Ajax we can parser xml from local directory as well as servers, Below example demonstrate how to parser xml with web browser.
<html>
<head>
<script>
function showCD(str) {
if (str == "") {
document.getElementById("txtHint").innerHTML...
Sunday, 23 July 2017
PHP - MySQL Login
This tutorial demonstrates how to create a login page with MySQL Data base. Before enter into the code part, You would need special privileges to create or to delete a MySQL database. So assuming you have access to root user, you can create any database using mysql mysqladmin binary.
Config.php
Config.php...
Friday, 21 July 2017
PHP - PayPal Integration
PayPal is a payment processing system, We can integrate PayPal with websites by using with php.
PayPal integration file system
PayPal integration file system included 4 files as shown below.
constants.php − This file has included API user name, password and signature.
CallerService.php − This file...
Thursday, 20 July 2017
PHP - Facebook Login
We can use Facebook login to allow the users to get access into the websites. This page will explain you about login with facebook PHP SDK.
Login With Facebook
Need to go https://developers.facebook.com/apps/ and click on add a new group button to make the app ID.
Choose Website
Give an app name...