Get Date value based on User Locale – Zend PHP

Use the code given below to get the date value in desired format based on user locale using Zend_Date() & Zend_Locale().


Read More

Parsing XML response which contains tags with colon


As part of integrating Webex conferencing service to my current working project, I came across on parsing XML which contains tags with colon (:). I was familiar with normal XML parsing [means XML tags without colon] and I have done a lots of such XML parsing. After searching on google for sometime, I found solution for parsing XML with tags which contains colon. I would like to share this solution with an example here. Please see below:


Read More

Hide PHP and Apache web server versions from response header

Normal PHP & Apache installations won’t hide the server details from request response headers. See below [with default configuration],


To hide PHP & Apache web server version details from response headers, you have to edit few configuration files on your hosted server.



After made the above changes, restart the apache web server.


Now check the response header from your server,


See the difference between the response headers before and after changing the configurations.

Note: These changes won’t made your server more secure. It is just hiding the configuration details from hackers.


Read More

Insert a object to AWS S3 using Zend PHP Framework

Here, I’m giving an example to insert a object to S3 using Zend PHP framework. Zend itself had built in library classes to communicate with AWS S3. So things are very easy.¬† Lets see how to do this. First we have to login to AWS console using the credentials which you had. Select¬† S3 console. You can create S3 bucket directly through AWS console or can create through code itself. Refer the example given below.


Read More

GoToTraining api integration with zend php framework

This is a sample format of code for integrating GoToTraining API within a zend framework project. I have integrated this API on one of my ongoing project. That time I faced a lot of challenges because of poor documentation without examples, provided by Citrix. After tackling every challenges, I integrated this API to my project successfully. So here I’m sharing the code which helps you to integrate this API, if you want.

To integrate GoToTraining API, first we should have a Developer Account (to generate API key) and Citrix online product account (to authorize the API key using Oauth 2.0). To know more about authorization process refer here.

After successful authorization process you will get following credentials, which are needs to be stored somewhere to use later.

i) Access Token: all API calls have to be requested using this token.

ii) Refresh Token: This is used to renew the access token when it is getting expired.

iii) Organizer Key: The key of Training organizer.

iv) Account Type

v) Account Key





You can integrate other GoToTraining API methods, as per the format specified above, by changing the URI and parameter values respectively.

Read More