Author Archives: Silver Moon

About Silver Moon

A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at [email protected].

Add Login with Yahoo to your php website

By | July 12, 2012

Yahoo OpenId In the previous article, we learned how to integrate . Its good to know that Yahoo is also an openid provider and “Login with Yahoo” can be added to a website in a very similar manner. Yahoo’s openid discovery url is http://me.yahoo.com/. The rest of the code is very simple. Code <?php /*… Read More »

Php code for login with google using openid

By | July 10, 2012

OpenId A very popular login method now a days is to allow users to login through their google, openid etc accounts. One popular protocol being used is the OpenId. According to wikipedia : OpenID is an open standard that describes how users can be authenticated in a decentralized manner, eliminating the need for services to… Read More »

Use clientside ssl certificate with curl and php

By | June 13, 2012

Clientside certificates are often used in soap webservices. For example the wsdl file link might require a clientside certificate. The server throws an error like this : HTTP Error 403.7 – Forbidden: SSL client certificate is required. Curl Command To use clientside certificate with curl , test the following command curl –cert certificate_file.pem https://www.example.com/some_protected_page or… Read More »

Fix Bsnl broadband frequent disconnection problem

By | November 7, 2012

Bsnl has plenty of high speed (4 MPBS) plans as mentioned here : http://bsnl.co.in/opencms/bsnl/BSNL/services/broadband/new_BB_postpaid.html . These are on the NIB – II Network. Ip addresses begin with 117. One known problem with the high speed internet is that it gets disconnected frequently. So like Yahoo Messenger or Pidgin or Skype could go offline every 5… Read More »

Login into phpmyadmin without username and password

By | June 25, 2013

Phpmyadmin auto login Phpmyadmin is a popular web based mysql database administration tool/frontend. It is used widely by php/mysql developers to manage database locally and remotely. When logging in to phpmyadmin, the user has to provide the mysql login credentials. However when working or developing on localhost , its better to make phpmyadmin login automatically… Read More »

10+ tips to localise your php application

By | April 14, 2012

Localisation Localisation involves changing various parts of application output like display of dates , time , numbers , language etc according to the standards of the geographical region of a user. Localisation is an important feature of applications that targets users across the globe and not just one region. So here are a set of… Read More »

Execute shell commands in PHP

By | March 27, 2012

Like any other language php applications often need to execute system commands like they are run from the terminal/console/commandline. Php has multiple functions to do this task. Lets take a look at each of these 1. system “system() is just like the C version of the function in that it executes the given command and… Read More »

Php get list of locales installed on system

By | March 26, 2012

On linux , the list of locales installed on the system can be fetched through the terminal command locale -a : $ locale -a C C.UTF-8 en_AG en_AG.utf8 en_AU.utf8 en_BW.utf8 en_CA.utf8 en_DK.utf8 en_GB.utf8 en_HK.utf8 en_IE.utf8 en_IN en_IN.utf8 en_NG en_NG.utf8 en_NZ.utf8 en_PH.utf8 en_SG.utf8 en_US.utf8 en_ZA.utf8 en_ZM en_ZM.utf8 en_ZW.utf8 es_AR.utf8 es_BO.utf8 es_CL.utf8 es_CO.utf8 es_CR.utf8 es_DO.utf8 es_EC.utf8 es_ES.utf8… Read More »

Install Quanta on Ubuntu 11.10

By | May 10, 2020

I upgraded my ubuntu few hours back from 11.04 to 11.10 ; it all went fine. After the upgrade I noticed that Quanta – my favorite php development tool had vanished. Doing few searches on google lead to the information that its now deprecated and not maintained in the repos anymore. So I got it… Read More »

Get time difference in microtime in C

By | March 9, 2012

The function gettimeofday can be used to retrieve the total number of seconds and balance microseconds elapsed since EPOCH. Structure timeval looks like this : struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec; /* microseconds */ }; On Linux it can be done like this : /** * Get time difference in microseconds… Read More »

Data type u_int8_t , u_int16_t , u_int32_t on windows

By | March 9, 2012

On Linux the header file sys/types.h provides the fixed sized integer data types like these : u_int8_t; u_int16_t; u_int32_t; On windows the header file stdint.h provides similar ones but with slightly different names , uint8_t etc. So if you are writing cross platform code you can get the same ones on windows as in a… Read More »