Categories
Anna Hazare Success

Who is Anna Hazare and What is LokPal Bill

Well i think most of you only heard the name of this person. And may be most of you may be interested to know about Anna Hazare. So here is a few details about Anna Hazare.

1. Who is Anna Hazare?
An ex-army man. Fought 1965 Indo-Pak War.

2. What’s so special about him?
He built a village Ralegaon Siddhi in Ahamad Nagar district,Maharashtra.

3. So what?
This village is a self-sustained model village. Energy isproduced in the village itself from solar power, biofuel and wind mills.
In 1975, it used to be a poverty clad village. Now it is oneof the richest village in India.It has become a model for self-sustained, eco-friendly & harmonicvillage. This guy, Anna Hazare was awarded Padma Bhushan and is aknown figure for his social activities.

4. What is he fighting for?
He is supporting a cause, the amendment of a law to curbcorruption in India.

5. How that can be possible?
He is advocating for a Bil, The Lok Pal Bill (The CitizenOmbudsman Bill), that will form an autonomous authority who will makepoliticians (ministers), beurocrats (IAS/IPS) accountable for their deeds.

6. It’s an entirely new thing right..?
In 1972, the bill was proposed by then Law minister Mr.Shanti Bhushan. Since then it has been neglected by the politicians and someare trying to change the bill to suit thier theft (corruption).

7. Oh.. He is going on a hunger strike for that whole thingof passing a Bill ! How can that be possible in such a short span of time?
The first thing he is asking for is: the government shouldcome forward and announce that the bill is going to be passed.
Next, they make a joint committee to DRAFT the LOK PAL BILL.50% goverment participation and 50% public participation. Because you canttrust the government entirely for making such a bill which does not suit them.

8. Fine, What will happen when this bill is passed?
A LokPal will be appointed at the centre. He will have anautonomous charge, say like the Election Commission of India. In each and every state,Lokayukta will be appointed. The job is to bring all alleged party to trial incase of corruptions within 1 year. Within 2 years, the guilty will be punished.Not like, Bofors scam or BhopalGas Tragedy case, that has been going for last 25 years without any result.

9. Is he alone? Whoelse is there in the fight with AnnaHazare?
Baba Ramdev, Ex. IPS Kiran Bedi, Social Activist SwamiAgnivesh, RTI activist Arvind Kejriwal and many more.
Prominent personalities like Aamir Khan is supporting hiscause.

10. Ok, got it. What can I do?
At least we can spread the message. How?
Like this page and copy this page url on facebooka and Promote the Anna Hazare Mission. Change your profile status message, links, video, changing profile pics.

At least we can support Anna Hazare and the cause foruprooting corruption from India.
At least we can hope that his Hunger Strike does not go invain.
At least we can pray for his good health.

Categories
Jokes Jokes on Politicians

Sarkari Nai(Govt. Barber) asks about Kala Dhan to Congress Politicians

Sarkari Nai (Barber) ne baal kaat-te waqt Kapil Sibbal se poochha – Saab ye Swiss bank wala kya lafda hai ?
Kapil Sibbal shouted – Abey tu baal kaat raha hai ya inquiry kar raha hai ?
Nai ( Barber)- Sorry saab aise hi poochh liya.
Agle din Pranab Mukerji se bal Kaat-ke waqt poojha – Saab ye kala dhan kya hota hai ?
Pranab shouted – Tum humse ye sawaal q poochha ?
Nai – Sorry saab bas aise hi poochha liya.
Next day CBI interrogated the Nai – Are u an agent of Baba Ramdev ?
Nai – Nahi saab ji.
CBI – Kya tum Anna k agent ho ?
Nai – Nahi saab ji.
CBI – To tum baal kat-te waqt Congressi netaon se faltu k sawaal q karte ho ?
Naayi – Saab na jane q Swiss bank aur kale dhan k naam par in Congress wale ke baal khade ho jate hain aur mujhko baal kaatne me aasani ho jati hai isliye poochhta rehta hoon.

Categories
C Language Linux Server

How to see output of C program in Linux or UNIX

As like most of the programmer i am new to Linux and i read c programming in college days. At college we used Turbo C compiler under DOS/Windows XP to write and compile C programs.
But in Linux we don’t have that compiler. So today i will tell you simple steps to generate the output of c program in Linux.
First create a simple c program called test.c.

In Linux there is a command gcc (GNU project C and C++ compiler) to compile a program. When you compile a program it generates an executable file called a.out.

Syntax
gcc -o output-file program.c
The above code will create a compile file of the c program.
Suppose your program name is mytest.c
then the command will be
gcc -o mycompilefile mytest.c

Now if you want to to compile the file on linux server then type the command:
gcc mytest.c

If you want to Execute the c program to see the output of tht c program mytest.c
./mycompilefile

Categories
C Language CITI Bank Payment Gateway Linux Server Payment Gateway Integration PHP

How to Integrate CITI Bank Emi Payment Gateway in Linux Server

Today i am writing another simple steps to integrate the CITI Bank PG for advanced PHP Programmer.
The following steps will only work on Linux server as the linux server already have shell scripting enabled. I did not tried the below process on Windows.
I suggest you to first read the docs files sent by Citi Bank team. Although they are having a less technical guys sitting in there team and they can’t provide the program written in PHP not in other languages. They have a simple C program and nothing else. Don’t waste your time in calling them again and again and the output will be negative.

Step 1. Create a folder named citibank (name can be different as per your choice) on your Linux server. The location would be like this “/var/www/html/citibank”
Step 2. Copy the checksum.so.1 and prog.c or santest.c C program file provided by Citi Bank PG Support team in the folder.
Step 3. Then create a PHP program generate_checksum.php
<?php
shell_exec(‘gcc -rdynamic -o prog3 prog3.c -ldl’); // this shell command will create a prog3 compile file that will help to generate the checksum
?>
The above program will create the prog3 executable compile file on your server.
(* As the file will be created in the same citibank directory so the directory must have 0777 read write permission.)
If the executable compile file is not creating then there must be some problem and you can not proceed further without this file. Contact the Network Guy in your team or read the error log to resolve the issue.

Note: If you want to know that shell scripting is enabled on your Linux server is not then run the following php code.
<?php $output = shell_exec(‘ls -lart’); ?>
If the PHP Program shows some output then the shell scripting is enabled on your server.
If not then refer the log file at location “/var/log/httpd/error_log” (As i am using the Apache Server)

Step 4. If everything written above is working in a correct way then you may proceed further with the following PHP program.
Simple create a file form.php on your server and run the program.
<?php
function getChecksum($string ,$key)
{
$checksum_output = shell_exec(“./prog3 $string $key”);
$checksum_output = explode(‘=’,$checksum_output,2);
$checksum = $checksum_output[1];
$generatedChecksum = trim($checksum);
return $generatedChecksum;
}
$checksum = getChecksum(‘CITI’, ‘9310341016vasim’); // 4 digit and 12 digit
$return_url =’http://www.YourWebsite.com/anyreturnfile.php’;
$d_m_y_his = gmdate(‘dmYhis’); // 182652
$merchant_code = ‘44350912’;
$order_no = ‘20811332’; // 20662730
$trace_no = ‘662730’; // 662730
$amount = ‘200.0’;
?>
<FORM name=”frm” action=”https://www.test.citibank.co.in/servlets/TransReq?” method=”post” >
<INPUT type=”text” size=”200″ NAME=”MalltoCiti” VALUE=”0100|<?php echo $return_url; ?>|1|<?php echo $checksum; ?>|<?php echo $d_m_y_his; ?>|<?php echo $merchant_code; ?>|<?php echo $order_no; ?>|<?php echo $trace_no; ?>|<?php echo $amount; ?>|”>
<input type=”submit” NAME=”Submit” value=”Pay Now”>
</form>

The C Program that will be used by above php program is

#include
#include
#include
#include

int main(int argc, char *argv[] )
{
void *handle;
char temp1[strlen(argv[1])+1];
char temp2[strlen(argv[2])+1];
strncpy(temp1,argv[1],strlen(argv[1]));
temp1[strlen(argv[1])+1] = ‘\0’;
strncpy(temp2,argv[2],strlen(argv[2]));
temp2[strlen(argv[2])+1] = ‘\0’;

char *str;

char* (*func)(char*,char*);
handle=dlopen(“/var/www/html/non-deploy/checksum.so.1″,RTLD_LAZY);
func=(char* (*)(char*,char*))dlsym(handle,”Transpo”) ;
str=(char*)malloc(sizeof(char) * 20);
str=(char *)((*func)(temp1,temp2));
printf(“STR = %s \n”, str);
}

According to me everything will work fine and the Citibank url https://www.test.citibank.co.in/servlets/TransReq? will open successfully.
If there is something that you did not understand then you can Conact me.
Cheers and have fun!

Categories
PHP RSS Feeds

How to Display RSS Feeds from other websites in your PHP Page

RSS stands for Really Simple Syndication and Atom are two famous feed format.

If you open any RSS Feed page, first line starts with < ?xml … ?> and then and at the end .
So anything inside and is feed data.
Every content is placed under .
So all we need to do is read information inside and display it.

Here is a sample program that does it.

/* Our Code Starts Here */

//Enter the Feed url as parameter to function

$xml = simplexml_load_file(”http://www.vaseemansari.com/blog/feed”);

//To check if the read document is a rss feed

if($xml->channel->item)
{
$contents = $xml->channel->item;
foreach($contents as $content)
{
echo $content->title;
echo $content->description;
}
}
else
{
echo “Invalid RSS Format”;
}

/* Our Code Ends Here */

I will provide you the complete zip file of the php code very soon. Please be in touch and keep on reading.

Categories
Islaam Ramadan Mubarak

A dua for All in Holy month of Ramadan Kareem

Assalamlaikum,

RAMADAN KAREEEM!

Here’s wishing you all the best wishes and Ramadan Karim.
It’s never too late to make duas for my dear brothers and sisters. J

On behalf of my entire family, I pray that in this Ramadan your relationship with our AlMighty Creator is enhanced by all of your good actions. May Allah(swt) protect you and your family from all of the fitnah that lurks within our own souls. I beseech Allah(swt) to accept all of your prayers, fasts and supplications. Ameen

Please make dua for the Muslimeen across the Globe and for our community in Edmonton. Pray that we’re not a fitnah for others especially our own family members.

May Allah(swt) guide us to understand and implement the teachings from His book and our beloved Prophet’s (pbuh) message. May we never deviate from the straight path.

Please forgive me for my many shortcomings that you might of come across.

Time to smile
Time to celebrate
Time to fast
Time to binge
Time for everything…

Wasalamlaikum,

Vaseem Ansari

httpv://www.youtube.com/watch?v=OcZeBfVBWb8