Category Archives: Programming

Working with LDAP details.

26 Jul , 2010,
Administrator
, ,
No Comments

Some people like to use website to be logged in with external people. Some people wants logged in for only in-house members. so they host their on server. such time of work generally to be used only Intranet. and they don’t want internet people to logged in for the application. In such case LDAP login will be one solution. most of the organization already have their ldap is configured. so web application need to use LDAP details.

Following are the thing which I am expecting to be installed on your machine.

  • openldap
  • php-ldap module
  • phpldapadmin [just to cross check functionality]

LDAP is having their own structure of managing and maintaining the hierarchy. each level of representation have their pre defined schemas. These schemas are written in /etc/openldap/ldap.conf & /etc/openldap/slapd.conf both of these files are only accessible to root. Please note that I have made this development in linux operating system so all documentation written here are base of linux things.

Now As development point of view. if you want to make the working environment on your local machine you have to perform following details.

Now first step is to configure slapd.conf just login as root and open this file for edit and you will see first 4-5 lines which represent their schemas

include /etc/openldap/schema/corba.schema
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/duaconf.schema

Please note that every ldap having different set have schemas. so depending upon their ldif file has to be written. Here I have considered default installation made in fedora 13. basically ldap stores in details in light weight database structure bdb (burckley DB) or ldbm. Here I have considering bdb.

in slapd.conf file you will find these lines.

database bdb
suffix "dc=runwalsoft"
rootdn "cn=root,dc=runwalsoft"

Might be dc and cn will be different machine to machine. Note that dc is suppose to be domain name. let say if you have your server as something.com then dc will be dc=something,dc=com. There are few terminologies which you need to understand here.

dn = Distinguished Name, cn = common name, rdn = relative distinguish name, dit = directory information tree, slapd = standalone LDAP.

Now In the same file you will find “rootpw” this is main admin password for ldap. In *nix system admin is always called as root. so machine root and ldap root you can seperate it. and its password you can set with line as follow

rootpw {SSHA}sDH698lRKptqw6d1uFmAKifrgZnvlcGc

Here ssha is encryption which is used. for setting new password you can use slappasswd command. when you type this in terminal they will give you some encryption for it.

Few lines at bottom you will find word directory so this is directory path where the actually directory is stored. now last but not the least at the bottom you will have to give others to access this ldap. if you don’t give access to ldap rest of the things will not be possible to use it.

access to * by dn.exact="cn=root,dc=runwalsoft" read by * none

With the above line we are allowing people(inhouse users) to use access ldap structure. Now this is all you have configured ldap configuration. Now its main part is to add users or information into ldap. but before that you need to be sure whether whether ldap is working properly or not.

on services make sure you have enabled slapd service. or you can from command prompt start slapd service

service slapd restart

Always make one thing sure that whatever you made changes in any conf file you have to restart that service.

How to see whether ldap is properly configured or not ?

Just open terminal(command prompt) and type following code

ldapsearch -x -b '' -s base '(objectclass=*)'

In that output if you see dc then it means that functionality is proper. and configuration is made proper.

Now next part is to add ldap details e.g. user and other information. Now you have to know that every information which we are going to save it has to work with schemas which is included in slapd.conf file.

Lets create one file “working.ldif” where we are going to add following set of code.

# Entry 1: dc=runwalsoft
dn: dc=runwalsoft
dc: runwalsoft
description: This will be Hostname;
o: bowling
objectclass: dcObject
objectclass: organization

# Entry 2: ou=people,dc=runwalsoft
dn: ou=people,dc=runwalsoft
description: These are peoples
objectclass: organizationalUnit
ou: people

# Entry 3: cn=manish,ou=people,dc=runwalsoft
dn: cn=manish,ou=people,dc=runwalsoft
cn: manish
objectclass: inetOrgPerson
objectclass: top
ou: Developers
sn: manish
title: Manish Runwal
uid: manish
userpassword: fedora

# Entry 4: cn=roger,ou=people,dc=runwalsoft
dn: cn=roger,ou=people,dc=runwalsoft
cn: roger
mail: roger@runwalsoft.com
objectclass: inetOrgPerson
objectclass: top
ou: Developers
sn: roger
title: Roger F
uid: roger
userpassword: fedora

# Entry 5: cn=user1,ou=people,dc=runwalsoft
dn: cn=user1,ou=people,dc=runwalsoft
cn: User1 Lastname
cn: user1
mail: user@runwalsoft.com
objectclass: inetOrgPerson
objectclass: top
ou: Human Resource
sn: user1
uid: ulast1
userpassword: user1

 

Now next part will be adding this working.ldif file to ldap structure for that you need to use following command.

ldapadd -x -D "cn=root,dc=runwalsoft" -w-f working.ldif

After that this will ask for root’s password. enter the password, and done. things are working. now…

how to see structure of our newly created ldap ?.

a) Either you can use php program or b) you can use phpldapadmin

before making the program. I hope you have installed phpldapadmin when you try to visit site http://localhost/phpldapadmin you will see it is asking for login dn and Password

Now dn is the thing which you have written in slapd.conf file so in dn box you have to write the following things.

cn=root,dc=runwalsoft

and in password write down the password . I am expecting that this will allows you to connect and make it working. now let say if you don’t want to login with root then also you can properly use phpldapadmin. just in dn you have to write complete path.

cn=user1,ou=people,dc=runwalsoft

and in pasword : user1

this also allows you to connect to ldap. please note that phpldapadmin only allows you to view bottom childs of your hierarchy and not the parent.

Now you will notice that when we try to create child node for ldap structure we have to use their objectClass so these objectClass differs from schema to schema. Now in the next blog you will learn how to connect ldap using php.

If you have any question don’t hesitate to ask me. I will respond your comments.

Working with mysql foreign keys.

5 Feb , 2010,
Administrator
, ,
No Comments

We have seen that most of the time people write many lines of code. Might be the reason behind is that they either don’t know the capabilities of the each and every modules. Out of that different module one module is mysql.

As most of the websites having some kind of relational database. where their is one master table. and their keys are used in other tables. But if the programmer don’t know about the foreign keys then they write the code at the time of deleting the record e.g

Lets imagine that We have 2 tables

  1. Books
  2. Purchasers

people write following syntax.

create table books ( id smallint primary key auto_increment , name varchar(100));
create table purchasers (id smallint primary key auto_increment , bookid smallint , pur_name varchar(100));

While creating this, many programmer forgot major things. as they are creating these tables with storage engine as myISAM. but they forgot all transactional details need to be saved in InnoDB. and current released version’s of mysql support foreign key for only innodb. and Now php is being concern they write code for 2 sql statement for deleting books and their purchasers. this is really bullship.

Now We have seen that when we got the work for existing websites. we seen similar things in many cases( almost all the cases). this really increases lots of efforts in programming as well as maintaining the codes. For owner of websites , they don’t bother(rather they don’t know) what other/older programmers written on it. this increases our efforts even more. And now our database designer taking meetings with programmer and explaining the things was older database. so programmer have to find excessive work written on the code. and replace with just simple modification made by our DB designer.

First Important thing needed is to first convert required tables into innodb

alter table books engine = 'innodb'; 
alter table purchasers engine = 'innodb' ;

Then Adding of foreign keys.

alter table purchasers add foreign key (bookid) references books(id) on delete cascade on update cascade ;

Doing This will add foreign key so that when we delete any book it will delete all their respective references given on purchasers table. which can be achieved with only single sql execute in php see the following line.

delete from books where id = _NUMBER_

some time we have seen that we have to drop foreign keys. and mysql manual says that use the following syntax.

alter table tableName drop foreign key keyName ;

But now the problem is that how to get that key name. Then you need to use following way.

show create table tableName;

Doing this you will get name of foreign key. then delete the foreign key and index key. Please note that when you want to add foreign key to any table try to make foreign key symbol name by your own rather than automated by mysql. This will easier for you manage and maintaining the all the keys. every foreign key comes with 2 kays one foreign key and one index key. if you just delete only foreign key then it will not be good way. as you are keeping garbage of index kay.

How to use Site API to create short url?

22 Apr , 2009,
Administrator
, , , , ,
No Comments

Recently there was one requirement for one customer. where we have to post data to twitter application. but twitter when submitting comments on twittter, twitter having limitation that it has only 140 characters to be posted for status. out of that customer wants to post their blog’s url as well.

Now things started making complicated. I have suggested him to doc one short domain but later realize that he doesn’t have option to part domain for their hosting. so I have been told to use API for which will programmatically convert long url into short url. so I have added this blog so that people will understand how to create program which will dynamically covert long url into shorter one.

All the methods which I have suggested based on php programming.

Requirement :

I have used some of higher php function for that it needs you have 5.2.0+ and JSON is integrated. and Curl option is enable for your domain.

There has been 2 sites which we are working on http://cli.gs and http://bit.ly now you have registered their site. I hope they are still free and get Key as basically these are the keys which want while processing.

cli.gs

For This site you need to understand POST is not accepted by cligs. so you have to send data in get method.

<?php

$key = "abe34849f398d02b83abf64ed6690ef5a"; // This will be your key
$tobeShorten = "http://www.runwalsoft.com/blog/index.php";
// This will be url which you want to make it short
$url = "http://cli.gs/api/v1/cligs/create";
$param = "url=". urlencode($tobeShorten) ."&title=This is testing&key={$key}&appid=RunBlog";
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url . "?" . $param);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
// Look at the returned header
$resultArray = curl_getinfo($ch);
curl_close($ch);

if($resultArray['http_code'] == 200)
{
  // This means that key is correct and the url which you have given is also working.
  echo "Short url is <b>" . $result . "</b>";
}
else
{
  echo "Error occured " . $resultArray['http_code'] ;
}

?>

Note : here key which I have written is dummy key. where you have to copy paste the key which you got from the site. and see you will get short url

Bit.ly

For Bit.ly there are few advantages and few are disadvantages. we can create 5 links concurently from same IP address. though that is really rare condition. advantage is that you can process multiple links at the same time. Means let say you want to convert 4 links in just one CURL call then it will be possible. and here you can use POST as well as GET mothod.

In both site you need to understand we have taken care of response from the server. if we got response header as 200 ( which means OK) then everything moving on is preety good. by default bit.ly provides response in JSON. I hope you know that thing. if you don’t know much just visit here its one of the simple method to process.

There is another option as well to process reponse as xml but I also still feel better to use JSON.

<?
$key = "R_c02b4ad85ccdsde92asdfe3951dfac08";
$username = "mrunwal" ;  // This is username when you register on their site.
$tobeShorten = "http://www.runwalsoft.com/blog/index.php";
$url = "http://api.bit.ly/shorten";

$param = "url=". urlencode($tobeShorten) ."&title=This is testing&key={$key}&appid=RunBlog";
$param = "version=2.0.1&longUrl=". urlencode($tobeShorten) ."&login=". $username ."&apiKey=" . $key ;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url . "?" . $param);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
// Look at the returned header
$resultArray = curl_getinfo($ch);
curl_close($ch);

//Following is the method to handle json output

//This function REQUIRES you should have php5.2.0 +
$result = json_decode($result,TRUE);
// This is the response which you gets from curl
/* "errorCode": 0, "errorMessage": "", "results": { "http://www.runwalsoft.com/blog/index.php":
{ "hash": "ptlxO","shortKeywordUrl": "", "shortUrl": "http://bit.ly/11vL1X", "userHash": "11vL1X" } },
"statusCode": "OK" */

if($resultArray['http_code'] == 200 && $result['errorCode'] == 0 && $result['statusCode'] == "OK")
{
  // This means that key is correct and the url which you have given is also working.
  echo "Short url is <b>" . $result['results'][$tobeShorten]['shortUrl'] . "</b>";
}
else
{
  echo "Error occured " . $resultArray['http_code'] ;
}

?>

Using this way it will be easier for you to process all shortenning of url. I hope you will feel better to use Runwalsoft’s programming for your current project. don’t botter to contact us.

AHVideoz.com’s new theme on move

5 Mar , 2009,
Administrator
, , , ,
No Comments

As this web site quite looks similar to albumhunt.com but there are many different things which was not in albumhunt or previous version of ahvideoz. as previous version of ahvideoz had problem of security which he wants to fix with new system. though system is already being ready 1 month ago. But there is drastic efforts was taken on testing this web site. when system was on alpha stage then old version web site reported one more problem that search feature is blocking/locking all the tables.

As any how we need to support that customer. though this part is their major problem and never like my customer in trouble. I told them that we need to upgrade

  • Mysql server
  • Installed Memcache module
  • Grant user for creating procedures, trigger, functions.

As server company was belong to his friend. and he is quite friendly with me as well. so upgraded the module. thought memcache need to add some part in our programming. this make that site even super fast. and load on the server was drastically reduced. as most of queries(lots of sql statement) are being executed in cache parts so its very obvious that program will be move faster.

Previous version belongs table structure. and new version of the site itself tableless structure so html pages are moving even more faster. This is the work which I really happy to deliver bcz lots of things working as per my expection. There is another project “parasmani suiting” for that I had contacted Indiatimes’s hosting panel but their staff are one the fool peoples. They have upgraded mysql to mysql5.0 but doesn’t provided permission to user for creating procedures , trigger or function. so I unable to provide advance features to my customer. Here in this case, hosting guys are really smart enough to understand technologies and ready to move for advance versions.

In this project we have used sprits as well. to understand sprite keep in touch with this blog. This whole work is carried out in smarty template engines. It looks that I fall in love with smarty. 🙂

This is how their new site looks like.

New Theme for Ahvideoz

New Theme for Ahvideoz

when ahvideoz saw this site then he is also happy to give his more work to runwalsoft. and thats what I called goodwill for me. There are some minor changes on the site and then we will move another work for this customer.

How to make site super fast?

27 Jan , 2009,
Administrator
, , , , ,
No Comments

You might have seen that google, yahoo and many other sites are super fast. Though there are many thing which affect to make site super fast. But lets discuss some of the points which belongs to programming or programmer.

Most of the time what we design is much important. because if design is wrong then it will affect the performance of the site. let see following points step by step.

  • Database
  • Image Creation
  • HTML Pages
  • CSS Handling
  • Cache Utilization
  • Hardware related things [ This things belongs to hosting company so it will not be explain]

I will explain each points with you in short time. stay tune.

Steps for converting mysql to mysqli

18 Jan , 2009,
Administrator
, ,
No Comments

As mysql and mysqli both belongs to same mysql server. mysql and mysqli as just modules provided with php.

when we started working on php and mysql then only mysql module was provided and different hosting company even not updated their mysql for latest version. so specifically we had to use the old technique to access these things. now many things are changing. People at the server company realize that they need to keep updated servers then only they will get more customer for their hostings. and now a days even customer are already known abt pros and cons of databases.

Now things begins here. now you have old traditional web site which was created using old techniques and you want to make things more optimised and go with new cutting edge technologies. so there few things which you really need to keep in mind that now a days different layers are used for web sites. its not as easy as what traditional methods. now on every front peoples are getting more advance. just for the sake of example. now for handling database there are dedicated peoples who knows clustering , memorycache ing for mysql. and in designing now advance flash version details are used with greate features. some templating used to keep site flexible to modify. and here we(Runwalsoft) have made all front details advance. each of our designer, programmer, database handlers are advance. they know how to tacles the hits. and how to mange more hits without losing their customers.

just for the sake of programmer. let say if you have used to open database connection you might have used.

$cn = mysql_connect('localhost','root','password') or die ('Unable to connect' . mysql_error());

which now you have to change like this.

$cn = new MySQLi('localhost','root','password','DatabaseName') or die("Unable to connect");

in the similar fashion you have to change queries as well previously we was using

$rs = mysql_query($sql,$cn) or die("Unable to find sql statement<br>" . mysql_error());

which is now

$rs = $mysqli->query($cn, $sql) or die("Unable to find sql statement <br>" . $mysqli->error);

I know that this is very very simple things but sometime people forgot how to use these. so I am writting this for newbie. mysqli means that mysql improved. and it having my good features along with it. I will update few more lines after some time. lets have start atleast. 🙂

How to write mysql stored procedures with php5

19 Dec , 2008,
Administrator
, , , ,
2 comments

Hello Everyone,

This is really long waiting features on mysql side as well php sides person. that is stored procedure things. I have almost tried all servers. oracle, mssql, msaccess, post gre, mysql. all of them having similar features. just few things are additional or remaining in some of databases.

One best loved things are Stored Procedures.

Q: Why we really need stored procedures ?

A: If you want create big web sites or net applications. all database need to be properly placed. There need to proper seperation of designing layer, application layer. and need to have database layer as seperate entity. I know you might thinking why we need that layer. as I have seen from many years that customer changes their servers as time progresses. and each hosting company giving different price packages. so customer choses their different server. so rather changing the whole application if we have things properly managed on our end then it will be easiest for customer to be independent on server selection.

And Runwalsoft.com is master in doing all code seperation. Stored procedure are pre-compiled sql statements. and basically business logic resides here. so most of the time it is required to change. so let say if some one wants to alter the logic. he will just open stored procedures and alter the changes according to customers need. this makes less disturbances in other code. and where ever you have used the similar function is automatically changed.

In Market generally use normal sql statements in php files. let say project is almost completed and customer have added features to enable or disable depending upon region, Then for this requirement let say we have added such statements in 40 files then we have to change that 40 php files. This takes time on programmer point of view. and generally programmer charge customer for his timing. Though he made wrong design. and he updated only 38 files and forgot to change 2 files. this creates website functioning extremly wrong. visitor of the web sites thinks that creator of the site is fool. or site is worst. and visitor never visit site again. this is lose for site owner.

Now Let say if programmer created database layer seperate. and in that layer if he used stored procedures then for every stored procedure they have used their call on 40 pages. so for changing 1 stored procedure is very small amount of time. inshort this way it will charge less to the customer. and Runwalsoft.com doing same things. we create the system in such a fashion that things are so seperated that it will be easily managable.

Q: As software purchased what they need ?

A : when they are purchasing any hosting company make sure they have mysql5.0 or above and php5.0 or above installed on their server. if their are lesser version then it will be problem in creating web site. what happen let say if you have lesser version. we have develope that layer (database layer) in traditional old way. so then further changes might cost you more. so sometime its quite better to purchase updated server.

Q: I am programmer how to incorporate stored procedures in php ?

A: I have seen that many people uses phpmyadmin as admin panel for it. so you can use that admin panel to create procedure on that only little difference is that let say if you click on “sql tab” at the bottom of it you will see the box called delimiter to changed “;” to // ( or something other than ; ) and write the following syntax for it.

create procedure showAddition(first decimal(10,2),second decimal(10,2))

begin
select (first + second) as addition;
end

This will create stord procedures. now its time to create page for php. in previous days generally programmer having habit to use mysql normal functions

mysql_connect , mysql_query , mysql_num_rows

But as mysql module doesn’t support stored procedures. you need to installed or need to tell your hosting company to activate mysqli [MySQL Improved Extension] module. this having features to access stored procedures , triggers and many advance fetures which mysql is provided. mysqli technically supports transactional and non transaction databases.

so coming to point.

PHP Code. I am giving you just short code how to access above procedure.

<?php
$mysqli = new MySQLi('localhost','root','root','test') or die("Unable to connect");

$a= 100 ;
$b = 20 ;
// This will fetch results but doesn't show results
$sql = "call showAddition('" . $a ." ','". $b . "');";
if ($mysqli->multi_query($sql)) {
    // This is for first Result ;
    $mysqli->next_result(); // # why this ? *A
    $rs = $mysqli->store_result();
    while($row = $rs->fetch_assoc())
    {
        print_r($row);
    }
}

?>

*A : for accession stored procedures generally mysql sends first response error code. and then it sends output which we have shown. so we have to bypass first resultset.

Another important point is that you need to access mysqli_multi_query function to get multiple results from the database. though there are many different methods. but for the start let have one function working. then I am sure you will become master on it.

Regards

Runwalsoft.com

Animated PNG coming into Town.

26 Nov , 2008,
Administrator
,
No Comments

Mozilla Firefox 3.0 is the best which I really love to work with. even I have seen that its supporting html5.0 and css3.0 and higher scripting lanagues. This will be futures come to true. I am sure Microsoft is really worried about things moving forward on mozilla organization.

Long waited thing which is now Firefox 3.0 is supporting is animated PNG ( Portable Network Graphics) . as png itself Open Source developement. and another developement is of animated PNG. but previous versions of FF and IE 7 doesn’t support this feature. Let have a look at this animation in FF3.0

Animated PNG In GIF we generally keep each and every pixel transparent transparent. but now png supports 24 bit color. with 8 bit alpha formatting. for backward compatibility browser which doesn’t support Animated PNG then this file shows only first frame.

For More Details https://developer.mozilla.org/en/Animated_PNG_graphics

How to execute javascripting inside of ajax response ?

22 Sep , 2008,
Administrator
, ,
No Comments

This is bit complecated to under stand. let me explain.

Problem : I have written one html+scripting response from ajax code. sometime problem is that in response we write <script> tags. and we think that these script tags are executed when we use following code

Let say Ajax response is
-------------------------
<div>Abc</div>
<script language='javascript'>
alert('Alert me :: from ajax');
</script>

when we get such response we thing that alert will be excuted. but officially its not executed. script element will be added in all collection node. considering as html entities. and not as script entities. so for executing script as script we have to do things are below.

    if (xmlHttp_page.readyState==4 || xmlHttp_page.readyState=="complete")
    {
      document.getElementById('main_div').innerHTML= xmlHttp_page.responseText;
	var ob = document.getElementsByTagName("script");
	for(var i=0; i<ob.length-1; i++){
	if(ob[i+1].text!=null) eval(ob[i+1].text);
	}
    }

Last time I tried this option but it did not worked for me. I thought it was basically problem with IE only. as firefox working properly. then again I google many people suggested that scripting should be appended on head elements. but still that also doesn’t work.

After lots of attempts I found when response is send by server then first data (or first line of data) need to be html then only above function works for it. To understand it properly let me explain you in short.

just create 2 Files.

1. index.html

2. dump.php (this will be used for ajax response)

Index.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Ajax Response</title>
</head>
<body >
<script type='text/javascript'>
	function GetXmlHttpObject()
	{
  	var xmlHttp=null;
  	try
  	{
 			// Firefox, Opera 8.0+, Safari
 			xmlHttp=new XMLHttpRequest();
 		}
		catch (e)
 		{
 			// Internet Explorer
 		try
  	{
  		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  	}
 		catch (e)
  {
  	xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	}
	return xmlHttp;
	}
var oXML
function TryIt()
{
	oXML = GetXmlHttpObject();
	oXML.open("GET","dump.php?cacheBust=111",true);
	oXML.onreadystatechange=showPage;
	oXML.send(null)
}
function showPage()
{
	if (oXML.readyState==4 || oXML.readyState=="complete")
	{
		document.getElementById('data').innerHTML = oXML.responseText ;
		var ob = document.getElementsByTagName("script");
		for(var i=0; i<ob.length-1; i++){
		if(ob[i+1].text!=null) eval(ob[i+1].text);
		}

	}
}
</script> 

<input type='button' value='try it' onclick='TryIt()'>
<div id="data" style="">
</div>
</body>
</html>

Dump.php

<h3>Testing</h3>
<script type='text/javascript'>
	alert('testing');
</script>

Now execute this code. you will find it works on IE as well as in FF. now if we just change that dump.php as follows then you will not receive alert.

Dump.php

<script type='text/javascript'>
	alert('testing');
</script>
<h3>Testing</h3>

So always remember try to send html first in ajax response.

Solution By : Runwalsoft ( Manish Runwal).

What is XSS exploits ?

15 Sep , 2008,
Administrator
, ,
No Comments

This is called cross site scripting (XSS) attacks.

How peoples exploits just using input fields which generally provided on the site.

<A HREF="http://sitename.com/comment.cmi?  mycomment=<SCRIPT  SRC='http://spam-site/badfile'></SCRIPT>"> Click here</A> 

There might be different solution to solve this. for as we have find one unquie way. just use strip_tags in each $_GET method. if you think that there are any other method and there are different ways. or your comments and suggessions are welcomed.

Solution by : Runwalsoft (Manish Runwal)