eSewa Payment Gateway implementation in PHP


eSewa is the online payment gateway of Nepal which can be used for several purposed like making an online payment, paying utility bills, receiving money or setting up a merchant account. If you want to setup a ecommerce site and use eSewa as a payment option then here is a simple payment gateway implementation in PHP. This is just a sample. Of course you can take this as reference and make it more managed and organized. I have setup a demo site for this implementation in my site. You can find the whole source code at Github.
Sample form to be submitted to eSewa API:

<form action = "" method="POST">
<input value="100" name="tAmt" type="hidden">
<input value="90" name="amt" type="hidden">
<input value="5" name="txAmt" type="hidden">
<input value="2" name="psc" type="hidden">
<input value="3" name="pdc" type="hidden">
<input value="testmerchant" name="scd" type="hidden">
<input value="XYZ-1234" name="pid" type="hidden">
<input value="" type="hidden" name="su">
<input value="" type="hidden" name="fu">
<input value="Submit" type="submit">

See code at Github : Click here to see code


5 Best Open Source Guestbook Applications written in PHP

1. MGB OpenSource Guestbook

MGB OpenSource Guestbook is an open source guestbook application written in PHP, using JavaScript and a MySQL Database. It is easy to use, flexible and customizable with templates to make it fit 100% to your homepage.

Features :

  • Administration backend
  • User Management (Administrators / Moderators)
  • Different templates, styles for templates, iconsets
  • Akismet support (activatable / deactivatable)
  • Gravatar support
  • Different language files available
  • Moderated Guestbook (activatable / deactivatable)
  • 2 captchas (securitycode / mathematic) (activatable / deactivatable)
  • eMail Spam preventing (activatable / deactivatable)
  • Word censorship (activatable / deactivatable)
  • Smilies (if disabled, text smilies will be shown instead)
  • BBCodes (activatable / deactivatable)
  • Post time (min/max) to prevent spam

Home : MGB OpenSource Guestbook Home
Download : MGB OpenSource Guestbook Download

2. phpBook

phpBook is a free open source PHP/MySQL guestbook program. phpBook is loaded with several nice features. Some attractive features are Nice interface; Fast and stable code; IP logging and banning; Browser logging, etc.

  • reCaptcha input checking
  • Built around the Nooku core for security
  • Gravatar user images
  • Fast, stable Code
  • Language Templates (english, german, dutch) others to follow e.g.( italian, portuguese, french, danish, swedish, japanese, chinese, arabian, yug, greek, slovenian, czech, islandic, …)
  • Location Templates (world, europe, belgium, sweden, danish, dutch, …)
  • Floodprotect
  • IP-Logging and banning
  • Email logging and banning
  • Browser-Logging
  • Smilies Database (over 90 included)
  • Dirty Word Filter
  • Long Word Filter
  • Webmaster E-Mail Notify
  • Web-Admin-Panel
  • Moderator-Function (add, edit, delete comment)

Home : phpBook Home
Demo : phpBook Demo

3. Lazarus

Lazarus is a free guestbook script written in PHP that uses your MySQL database for storage and is based upon the excellent Advanced Guestbook script from Proxy2. Lots of additional features have been added in Advanced Guestbook and also added several layers of anti spam protection to make one of the most feature rich and spam resistant guestbook scripts available for free.

  • Powerful AGCode for formatting entries or even displaying pictures and Flash
  • Allow HTML in entries but control which tags can be used
  • Send emails using SMTP instead of sendmail
  • Create thumbnails for images that have a large file size
  • Automatic resizing of images and Flash files displayed in entries
  • Graphical smileys (emoticons)
  • Previewing of entries
  • Email notification of new entries and comments
  • Thank you email sent to guests after posting new entry
  • Use Captcha or Saptcha to prevent automated posting​
  • Each guestbook generates a unique form
  • Time delay before guests can post
  • Time limit on how long a guest has to post
  • Moderate entries before they appear in your guestbook

Home : Lazarus Guestbook Home
Download : Lazarus Guestbook Download
Demo : Lazarus Guestbook Demo

4. RicarGBooK

RicarGBooK is a guestbook system written in PHP and based on flat files. You can delete or modify any comment with an admin control panel. It’s easy, simple and completely free!

  • Easy to install.
  • No database required.
  • Approval messages.
  • Multiple languages available.
  • Guestbook error log.
  • Email notification.
  • Spam protection with CAPTCHA.
  • Spam filter.
  • Admin control panel.
  • Emoticons and BBCode.
  • Flood protection.
  • Bad words filter.
  • Admin can edit or delete comments.
  • Admin can ban IP address.

Home : RicarGBook Home
Download : RicarGBook Download
Demo : RicarGBook Demo

5. DigiOz Guestbook

The DigiOz Guestbook is a PHP driven guestbook system that stores all the entries in a simple text file. It is very simple to install and use, and the header and footer files included with the script allow you to customize the script to blend in with the rest of your website. The guestbook contains features such as entry flooding protection, administrative entry notification, bad word filter, emoticons, and much much more.

Features :

  • Flat file data storage for ease of setup
  • Header and Footer files allow you to customize it to fit your web site
  • Image verification to prevent spam from automated bots from posting
  • IP blocking for protection from spammers
  • Administrative area for deleting entries and monitoring the IP of spammers
  • Support of an unlimited number of languages using Language file generator
  • Smiley face support for guestbook entries posted
  • Styling support for bold, underline, italic font and centered text
  • Search feature to search through guestbook entries
  • Sorting capability for sorting entries by oldest or newest entry
  • Ability to make the email, name or message fields optional
  • Admin email notification for messages posted (optional)
  • Flood protection to prevent users from posting spam posts over and over
  • Referring URL Check to make sure spam bots do not auto submit messages
  • Bad word filter which can be customized to filter out any bad word

Home : DigiOz Guestbook Home
Demo : DigiOz Guestbook Demo
Download : DigiOz Guestbook Download


6 Best Open Source Social Networking Applications

Lots of social networking applications are available there which may be free or commercial. Talking about social networking Facebook is at top but sometime we may need self hosted business networking site. So open source social networking has become more and more popular nowadays. Here is a list of 6 best open source social networking applications which you can download free, customize and user as per your requirement.

6 Best Open Source Social Networking Scripts [Facebook clone scripts]

1. Elgg

Elgg is an award-winning open source social networking engine that provides a robust framework on which to build all kinds of social environments, from a campus wide social network for your university, school or college or an internal collaborative platform for your organization through to a brand-building communications tool for your company and its clients. Elgg is a nice social network script written in php and mysql with login option with facebook and twitter. Wirebox feature lets its users to shout whats on their mind, just like facebook and his friends get updated. It was awarded with ‘best open source CMS award’ in 2007. 
Elgg operates on a LAMP (Linux, Apache, MySql and Php) environment and it is easy to install and configure. With a little php knowledge, you can get your social networking site up and running in no time.


  • Powerful Data Model : Elgg provides a powerful data model making the creation of different entities simple, yet flexible.
  • Activity Streams : The granular activity stream API ensures your plugins can push the required content to your users.
  • Plugin API : Use Elgg’s powerful plugin API to build and add your required features.
  • User Management : Elgg handles your user management and relationship requirements.
  • Access controls : All objects in Elgg can have an access control level applied making granular access permissions possible.
  • Web Services API : Expose functionality through the REST API by building a plugin and then either publish the API for other developers to build clients or provide your own.

Home : Elgg
Download : Download Elgg

2. Oxwall

Oxwall is unbelievably flexible and easy to use PHP/MySQL social networking software platform. Its flexibility is an extremely easy way to change the way it works using Oxwall plugins. These plugins are complete units of functionality that can be used for various purposes. It take special care about core and plugins compatibility so any updates are easy like a breeze. Oxwall offers unseen level of efficiency when you need a full-featured, working site. Oxwall is used for a wide range of projects starting from family sites and custom social networks to collaboration tools and enterprise community solutions.

Home : Oxwall
Demo : Oxwall Demo
Download : Download Oxwall
Plugins & Themes : Oxwall Plugins and themes

3. BuddyPress

BuddyPress is an open source social networking software package. It is a plugin that can be installed on WordPress to transform it into a social network platform. BuddyPress is designed to allow schools, companies, sports teams, or any other niche community to start their own social network or communication tool. BuddyPress inherits and extends upon the integral functional elements of the WordPress engine including themes, plugins, and widgets. As it is built on WordPress it is written using the same primary technologies, PHP and MySQL.

BuddyPress has a range of features that will allow the creation of a social network application. However, based on your interest you can start with couple of features and simply turn off rest features that you don’t want by a click of a button. The basic installed system offers:

  • Activity Streams
  • User Profiles : Options to add user profile fields and sections; Avatar uploads
  • Group Creation : Group discussion forums; Group logo and Wire
  • Friend system : Messaging
  • Custom themes
  • Blogs per user (via the WordPress engine)

Home : Buddypress
Download : Download Buddypress

4. Mahara

Mahara is an open source e-portfolio system with a flexible display framework written in PHP. Mahara, meaning ‘think’ or ‘thought’ in Te Reo Māori, is user centred environment with a permissions framework that enables different views of an e-portfolio to be easily managed. Mahara also features a weblog, resume builder and social networking system, connecting users and creating online learner communities. Mahara is Linkedin clone script for career social networking. It has all the aspects to build a portfolio based website for members for career based social networking. Mahara content management system provides users with blogs, a resume builder, a file manager and a view creator – a tool to help users create arrangements of their content in a particular way for others to see.


  • File Repository
  • Blogs
  • Social Networking
  • Resume Builder
  • Profile Information
  • Administration : Themes, languages, session, authentication
  • Interface with Moodle
  • Scalability
  • Security
  • Interoperability

Home : Mahara
Demo : Mahara Demo
Download : Download Mahara

5. Xoops with Yogurt extension

XOOPS is an extensible CMS that allows you to build sites based on your needs. It is a web application platform written in PHP for the MySQL database. You can first start off as a personal blog and expand later to include social networking, forum and much more via the use of appropriate modules. Its object orientation makes it an ideal tool for developing small or large community websites, intra company and corporate portals, weblogs and much more.

Yogurt is the particular module that allows you to build a social networking site with XOOPS. You can setup your personal album of pictures, videos from YouTube, mp3 files, add your list of friends, a public wall for messages (scraps), to create communities (tribes) and many more useful features. XOOPS and Yogurt are based on php and work well in the LAMP environment.

Home : XOOPS, Yogurt
Download : Download XOOPS, Download Yogurt

6. LOVDbyLess

LovdbyLess is a free open source social network platform built with Ruby on Rails. Lovd by Less offers you social networking solution that has everything you need to build your community. Some features of Lovd by Less include blogs, photo gallery with captions, site search for friends, activity update and user-to-user messaging. Other things that are built into the software include Flickr and YouTube integration. One thing good about Lovd by Less is that it is easy to use and contains most of the applications that you need. For those who prefer Ruby on Rail rather than php, this would be a good alternative.


  • Follow a user, mutual following is friending.
  • User-to-User Messaging
  • Profile Comments
  • User Blogs with Comments
  • Photo Gallery with Captions
  • Site Search for Friends
  • Profile Bio and Information
  • User Dashboard (Recent Activity of Friends)
  • Emailed Activity
  • Flickr Integration
  • YouTube Integration

Home : Lovd by Less
Demo : Lovd by Less Demo
Download : Download Lovd by Less


10+ Best Free Web Based File Management Scripts Written in PHP

1. PHPfileNavigator

PHPfileNavigator is state-of-the-art, open source web based application to complete manage your files and folders. It provides a powerful, reliable and easy web file management with a lots of cool features. Easy to install and configure, you can administrate your files and folders as easy as in your hard drive and access with strong security all over the net.


  • Aditional Information Files
  • Safe Enviroment
  • Indexation
  • Web Access Control
  • Tree View
  • Download of Compressed Files and Directories
  • File Extractions on the Server
  • Size Control
  • File Type Restrictions
  • Full Administration
  • Activity and Error Logs
  • Image Management
  • Web Page or Document Upload
  • File Edition
  • Compressed File Content Visualization

2. BytesFall Explorer

BytesFall Explorer (bfExplorer for short) is a web-based file manager written in PHP and JavaScript and licensed under the GNU GPL. It allows you to upload, download, view, edit, copy, move/rename, compress and change permissions of a single file/directory or a group of files/directories. It’s also possible to create files and directories and execute shell commands. An SQL engine is used to store the users for the authentication (currently MySQL and PostgreSQL are supported). BytesFall Explorer has an interface similar to Windows Explorer.


  • easy and simple interface
  • interface similar to windows explorer
  • Tree structure
  • shell functionality
  • WYSIWYG file editor
  • compression tools
  • authentication methods

3. ProjectSend

ProjectSend (previously cFTP) is a clients-oriented file uploading utility. Clients are created and assigned a username and a password. Then you can upload as much files as you want under each account, with the ability to add a title and description to each one. ProjectSend provides easy and secure multi-file uploading and unlimited file size on ANY server! Even on common hostings shared accounts. When the client logs in, he will see a web page that contains your company logo, and a sortable list of every file uploaded under his name, with description, time, date, etc. It also works as a history of “sent” files. They can check the differences between versions, the time that it took to do that, and so on. Additional benefits include saving hundreds of mb. on email accounts since every file remains on your server until you decide to delete it, and they can be accessed from any browser anywhere.


  • Unlimited file size uploading! (thanks to plupload, uploding in “chunks” allows you to overcome any server restriction on file and post sizes).
  • Upload several files at a time and then add the information to all of them on a single screen.
  • Upload from the web interface directly or by FTP, and then import the files into ProjectSend.
  • Possibility to hide or show files from clients after they were uploaded.
  • Really simple and attractive design. Ease of use for both users and clients!
  • User roles (Administrator. Account Manager, Uploader).
  • Sortable full lists of files, users and clients.
  • Options for localization (you can select your timezone and date format). This is reflected inmediatly on every list.
  • Templates system allows you to easily change the files list features and appearance.
  • Two templates included: Default and Gallery.
  • Options and branding selection pages. Your company logo is seen on the clients lists.
  • Can be translated easily via .po files

4. eXtplorer

eXtplorer is a php-based file manager for your own web space. It’s cross-browser compliant and offers everything you need. eXtplorer is a PHP- and Javascript-based File Manager, which you can be placed on your own web space. eXtplorer has a stylish and user-friendly interface based on the ExtJS library. eXtplorer can also be used as a component inside Joomla and also as a standalone app.


  • Copy & Move Files and Directories by Drag & Drop
  • Dynamic Directory Tree with on-demand loading of subdirectories
  • Edit Files
  • Rename, Delete or Create new Files and Directories
  • Access Files through ”FTP” or directly (using PHP) to totally overcome permission and file ownership issue
  • Upload or Download files just as you like
  • Create and Extract Archives (ZIP, Tar, Tar/GZ, Tar/BZ)
  • User Management with different permission levels like “View only” or “Edit” and “Admin”

5. Pydio (formerly AjaXplorer)

Pydio helps you turn your web server into a powerful file management system : install once and access your files from anywhere. Organize, preview and share them, easily and securely. Pydio has a quick accessibility like a website. The program is supported by all major web browsers. Pydio can easily adapt to small screen devices. iOS application enables a comfortable usage experience on iPhone and iPad (Android coming). A Web-server with PHP 5.1 or later is sufficient to run Pydio.


  • Raise the level of security
  • Built-in metadata support
  • Explore other data repositories
  • Extend! Integrate!
  • Feel Safe. You keep control
  • Organize and preview your documents directly online
  • Sharing made easy

6. Arfooo Directory

Arfooo Directory is the most powerful free and open source directory script in the world. The directory script includes many customizable features with a single click, studied and designed to satisfy the greatest number of webmasters worldwide. With its advanced features, Arfooo directory is not a simple link directory script. Arfooo Directory allows you to create directories without asking link (URL) in submission form. Therefore, you can create all types of directories. Arfooo Directory is developed with latest technologies : MVC architecture, PHP 5 (OOP), Javascript / Ajax (jQuery) and uses UTF8 encoding. This directory script is developed and designed by an professional of search engine optimization (SEO) and integrates architecture and functions specifically dedicated to help you optimize your SEO directory in all detail: URL Rewriting, anti duplicate content , possible optimization of each field (html title, meta description, h1 tag), SiteMap.


  • Language and template system
  • Unlimited categories and subcategories
  • Create link directories, RSS feeds directories, but also
  • Create directories without URL like yellow pages, jobs
  • Display address, phone, fax, coupled with Google Maps
  • URL Rewriting, anti duplicate content, and possible optimization of each field for SEO
  • Simple and intuitive placement of your advertisments (Adsense, affiliate)
  • Create custom fields (text, checkbox, select)

7. phpXplorer

phpXplorer is an open source file management system written in PHP programming language. The file types, property sheets, views and themes are built on its own by modular design. It enables you to work on a remote file system through a web browser. By default it has got dialogs for editing HTML, PHP, image, Apache, compressed and email files. Its modular design makes it easy to build your own filetypes, property sheets, views and themes. phpXplorers permission manager enables you to restrict the access to the shared file system for multiple users in a detailed way.


  • remote file system using a web browser
  • editing options
  • modular design
  • permission manager
  • multiple user system
  • dialogs for editing HTML, PHP

8. QuiXplorer

QuiXplorer is a multi-user, web-based file-manager. It allows you to manage and/or share files over the internet, or an intranet. You can create new file and directories easily. You can also edit text files, download/upload files. Searching for files and directory makes your file access easy.

  • Browsing directories; showing names, file sizes,
    file types, modification times and permissions
  • Copying, moving and deleting files
  • Searching for files and directories
  • Uploading and downloading files
  • Editing text files
  • Creating new files and directories
  • Changing file permissions

9. NavPHP – PHP File navigator

NavPHP navigator with its unique XP style navigation is written in PHP and AJAX. The main features include multiuser support, Gzip & Deflate webpage, built in HTML and code editor as well as Extract Zip. This web based file manager is free.

  • User friendly Explorer style navigation and view. Fully customizable.
  • Multi user support (need MySQL).
  • AJAX & DOM to avoid reloading of the full page.
  • Gzip & Deflate web page encoding gives you rocket speed data transfer!
  • It inherits the colour scheme of your window system. See the magic of css2!
  • Thumbnail view for wbmp, jpg, png, gif and now bmp
  • Right click context menu.
  • Built in HTML editor, Code editor
  • Keyboard shortcuts (eg. [F2] rename)
  • Download file or folder as zip (eg. single click on name).
  • Extract zip archive to current folder.

10. LetoDMS

LetoDMS is an open-source document-management-system based on PHP and MySQL. LetoDMS allows you to store any kind of binary data – just like a usual file-system. But there are some features that extend the normal capabilities of a file-system. LetoDMS makes it possible to access your documents not only via intranet in your office but worldwide via the internet.


  • Document-Metadata
  • Security-Mechanism
  • Easy Access
  • Upload files through web-interface
  • Create folders to group your documents
  • Edit document and folder properties online
  • Detailed information on uploaded documents
  • Lock and unlock documents
  • Update documents – old versions are saved
  • Individual Icons for different Mime-Types
  • Set expiration-date for documents
  • Users are notified about new/updated or expired documents via email
  • Download documents or view them online within your Browser
  • Control access via detailed ACLs (access control lists)
  • User- and Group-Management
  • Powerfule search-engine
  • Template-System
  • Intuitive User-Interface
  • Should work with every Browser
  • Auto-conversion to HTML to view even MS Word-Documents online

11. OpenDocMan

OpenDocMan is an opensource document management for the masses. OpenDocMan is a free document management system (DMS) designed to comply with ISO 17025 and OIE standard for document management. It features web based access, fine grained control of access to files, and automated install and upgrades.


  • Check-in and Check-out files
  • Search Engine
  • Multiple Users, Departments, and Categories
  • File Moderation
  • Email Notification
  • Fine Grained Access
  • File History
  • Admin and Root users
  • Multiple Document Versions
  • Archiving function for deleted files
  • Bookmarkable URL’s
  • Breakcrumb Navigation
  • File Expiration