Category: Utilities


Donts of Email Etiquette

  1. Leaving the subject blank – always include a relevant subject. This even applies to mails that you reply to or forward to
  2. Typing in capital letters – this is considered to be shouting
  3. Sending emails to the entire organization that is relevant only to a few staff
  4. Storing out of date mail and never deleting them or the attachments
  5. Use of quirky and difficult to read fonts in an email
  6. Replying to all, instead of just to the sender
  7. Marking everything you send as high importance
  8. Sending mail with typing or spelling errors

Dos of Email Etiquette

  1. Be concise and to the point
  2. Answer all questions
  3. Use proper spelling, grammar & punctuation
  4. Use templates for frequently used responses
  5. Answer swiftly- usually within 24 hours
  6. Do not attach unnecessary files
  7. Use proper structure & layout
  8. Read the email before you send it
  9. Take care with abbreviations and emoticons
  10. Use active instead of passive
  11. Avoid long sentences
  12. Use cc: field sparingly
  13. Keep the paragraphs short
  14. Use bullet points if manuy points need to be explained
  15. Make sure your e-mail includes a courteous greeting and closing. Helps to make your e-mail not seem demanding or terse.
  16. Are you using proper sentence structure? First word capitalized with appropriate punctuation? Multiple instances of !!! or ??? are perceived as rude or condescending.
  17. When sending large attachments, always “zip” or compress them before sending.
  18. Only use Cc: when it is important for those you Cc: to know about the contents of the email. Overuse can cause your emails to be ignored.
  19. Include addresses in the To: field for those who you would like a response from.
  20. Include addresses in the Cc: field for those who you are just FYI’ing.
  21. Never expose your friend’s or contact’s email address to strangers by listing them all in the To: field. Use BCC:!
  22. Eliminate big words and overly formal language

Substitute words

  1. Talk about>> discuss
  2. Ask for>> enquire
  3. Help>> assist
  4. Think about>> consider
  5. Get>> receive
  6. Buy>> purchase
  7. Get together>> meet
  8. Let someone know>> inform someone
  9. Get in touch with someone>> contact someone

Useful Language

  1. Thanks for your email
  2. Just a brief note to say/let you know
  3. There are a couple of things, I’m not sure about
  4. Do call me if you’d like to discuss this further
  5. This has been due to/this is because
  6. It was a pleasure dealing with you
  7. Nice to hear from you
  8. I am attaching a copy of…
  9. Your request was forwarded to me
  10. I am afraid I could not open the document
  11. I look forward to your reply
  12. I am also sending a hard copy


  1. Could you
  2. Please could you
  3. I would be grateful if you could
  4. Can you
  5. Do you think you could.

Language To Be Avoided

  1. Please revert back/ reply back>> Use: revert/ reply
  2. Awaiting for your reply>> Use: Awaiting your reply/ waiting for your reply
  3. Please confirm me/ confirm us>> just use please confirm
  4. I suggest you>> I suggest that you…. Eg: I suggest that you upgrade to the next package

Get the client/user/visitor IP address using PHP

The simplest way to get the visitor’s/client’s IP address is using the $_SERVER[‘REMOTE_ADDR’] or $_SERVER[‘REMOTE_HOST’] variables.

However, sometimes this does not return the correct IP address of the visitor, so we can use some other server variables to get the IP address.


WHMCS stripe pay plugin



Do you want to accept credit cards on your website and save users confusion and time? This credit card gateway extension for WHMCS lets you accept credit card payments directly on your website via Stripe payment gateway.

With this extension your customer can use their credit cards during the checkout process and handles the rest. This means a smoother experience for your users as they never have to leave your website for making payments.

This is a free and open source Stripe Payment Gateway for WHMCS that supports one time and recurring payments without ever having a credit card number hit your WHMCS server.

Overview :

Stripe pay payment gateway allows the WHMCS billing system to use Stripe’s one time and reoccurring payment gateway capabilities. Stripe provides the unique ability to take a client’s credit card information without ever having the client leave your site, but it also allows for credit card data to never get stored in or even pass through your own server, eliminating costly concerns over PCI compliance. This gateway for WHMCS is being released free for anyone, although it should still be considered in beta as there are likely still bugs to work out of it.

You can sign up for a Stripe account at

Stripe API version :

  1. Stripe API 4.12.0 (Release date 05/06/2017)
  2. A Stripe Elements integration with js version v3

Requirements :

  1. PHP 5.3.3 and later.
  2. WHMCS (V7.X, V6.X)
  3. cURL must be enabled (This is most likely already enabled on your server, but you can contact your hosting provider if you are unsure)
  4. SSL certificate installed (in order to process live transactions)
  5. Stripe merchant account

Instructions For Use :

  1. Copy the file in the repository’s root folder called stripe.php and place it into the /modules/gateways/ folder of your WHMCS installation.
  2. From within the callback folder of the repository, copy the other stripe.php file and place it into the /modules/gateways/callback folder of your WHMCS installation.
  3. Copy the ccpay.php file from the repository into the root directory of your WHMCS installation.
  4. Finally, copy the clientareacreditcard-stripe.tpl file into the root level of the theme folder you are currently using for WHMCS. For example, if you’re using the default theme, then copy this file to /templates/default/.
  5. Add a webhook in Stripe to

In the end, your folder structure should look roughly like the diagram below, with a ccpay.php file in the root of your install, a stripe.php in /modules/gateways/callback, a stripe.php in /modules/gateways/, a clientareacreditcard-stripe.tpl in the root of your WHMCS active template folder, and the lib folder of the Stripe API in the newly-created /modules/gateways/stripe/ folder.

You may now activate this new payment gateway from within WHMCS through the Setup > Payments > Payment Gateways screen. This module should be listed as Stripe. You can then fill in the appropriate API key information as well as a required email address where the gateway can send you any serious errors that come up while billing clients or communicating with Stripe.

To download source code Click here !!!

Fork on Github

Support Information :

I’m always looking to improve this code, so if you see something that can be changed or if you have an idea for a new feature or any other feedback, send me an email to, or send me a message on Twitter (@starsagar91), and I’ll get right back to you. If you decide to use this module in your WHMCS install, send me a message to say hello (and let me know what you think too) and it’ll make my day. Thanks!

How to Copy directory/files from windows command line/prompt

COPY – It will allow you to quickly copy files from one location to another location.

Syntex > copy source_file_name destination_file_name

XCOPY – The xcopy command allows you to copy files and directories from one location to another location. This makes it much more suitable for copying folders. xcopy also has many modifiers which gives advanced users more control over the copying process.

Syntex > xcopy /E /I source_dir_name destination_die_name

Reference of /E and /I
/E – This option makes sure that empty subfolders are copied to the destination.
/I – Avoids prompting if the destination is a folder or file.

How can I offer a gzipped csv file for download using PHP?


I have a PHP script that creates  csv file from the db. I would like to have the script to create the csv data and immediately make a .gzip file available for download. Can you please give me some ideas?


You can easily apply gzip compression with the gzencode function.


Stripe Payment gateway integration in PHP with DEMO Examples

Stripe payment gateway integration

Stripe payment gateway integration

Stripe payment gateway offers 2 ways of integration in PHP –

  • Stripe checkout integration
  • Stripe custom integration (Stripe.js)

Strip checkout integration:

The easiest way to integrate Stripe is via Checkout, an embedded tool that takes care of building an HTML form, validating user input, and securing your customers’ card data. Using Checkout, sensitive credit card information is sent directly to Stripe, and does not touch your server. Stripe returns to your site a token representation of the card, and this token can then be used in a charge request.

Embedding Checkout in your site

To get started, add the following code to your payment page:

Stripe Checkout Demo

Reference link :

Stripe custom integration (Stripe.js):

For a more custom approach, you can instead use Stripe with your own payment form via Stripe.js.

Processing payments with Custom Stripe integration has two components:

Below code example show you demonstrate you the custom stripe integration with stripe.js.

Demo Link

You can download all above demos from below link :
Download Source Code


Browse source code in github :

If you have any additional questions Or queries, don’t hesitate to let me know!, Just put comment below or contact @ my mail id

Hope you enjoy my post 🙂

Bootstrap – Accordion Inside Accordion Example




Simple RESTful API webservice demo in PHP

API URL :  http://domain_name/api.php

Input param :

API Call Request :

Successfull Output :

Error Output :

API Script (api.php) :


You can download all above demos from below link :

Download Source Code


Browse source code in github :

SOAP Web Service Demo using NuSOAP library

The main advantage of using NuSOAP library is it allow developers to create and consume web services based on SOAP without any SOAP related PHP extensions.
If we were not able to predict production server system configuration(Like PHP version) then using of NuSOAP based web service is better.
It’s very easy to create and test webservice using NuSOAP library.

First we created the NuSOAP server which process web service request

Note : The “<webservice_url>” is absolute path of your webservice script(nusoap_api.php).
Ex. <webservice_url> =

Download Source Code


To consume and test above webservice we use below webservice client script.


Download Source Code

That’s it about NuSOAP webservice.
Happy Coding 🙂