How do I get out of a frameset in HTML ?

Thursday, May 6, 2010 12:11
Posted in category HTML 5

If you are the author, this is easy. You only have to add the TARGET attribute to the link that takes readers to the intended ‘outside’ document. Give it the value of _top.
In many current browsers, it is not possible to display a frame in the full browser window, at least not very easily. The reader would need to copy the URL of the desired frame and then request that URL manually.

I would recommend that authors who want to offer readers this option add a link to the document itself in the document, with the TARGET attribute set to _top so the document displays in the full window if the link is followed.

  • Share/Bookmark

How To Protect Special Characters in Query String in PHP?

Wednesday, May 5, 2010 12:02
Posted in category PHP Interview Questions

If you want to include special characters like spaces in the query string, you need to protect them by applying the urlencode() translation function. The script below shows how to use urlencode():

<?php

print("<html>");

print("<p>Please click the links below to submit comments about FYICenter.com:</p>");

$comment = 'I want to say: "It\'s a good site! :->"';
$comment = urlencode($comment);

print("<p>"
."<a href=\"processing_forms.php?name=Guest&comment=$comment\">"
."It's an excellent site!</a></p>");

$comment = 'This visitor said: "It\'s an average site! :-( "';
$comment = urlencode($comment);

print("<p>"
.'<a href="processing_forms.php?'.$comment.'">'
."It's an average site.</a></p>");
print("</html>");
?>
  • Share/Bookmark

What is the difference between the functions unlink and unset?

Monday, May 3, 2010 11:53

unlink() is a function for file system handling. It deleted any file.

unset() is a function for variable management. It deletes/unset a given variable.

  • Share/Bookmark

How To Read the Entire File into a Single String?

Saturday, May 1, 2010 11:50

If you have a file, and you want to read the entire file into a single string, you can use the file_get_contents() function. It opens the specified file, reads all characters in the file, and returns them in a single string. Here is a PHP script example on how to file_get_contents():

<?php
	$file = file_get_contents("/windows/system32/drivers/etc/services");
	print("Size of the file: ".strlen($file)."\n");
?>

This script will print:

Size of the file: 7116 
  • Share/Bookmark

In javascript how to Text From Your Clipboard?

Friday, April 30, 2010 8:55
Posted in category Javascript

It is true, text you last copied for pasting (copy & paste) can be stolen when you visit web sites using a combination of JavaScript and ASP (or PHP, or CGI) to write your possible sensitive data to a database on another server.

  • Share/Bookmark

Are you concerned that older browsers don’t support JavaScript and thus exclude a set of Web users? individual users?

Wednesday, April 28, 2010 8:55
Posted in category Javascript

Fragmentation of the installed base of browsers will only get worse. By definition, it can seldom improve unless absolutely everyone on the planet threw away their elderly browsers and upgraded to the latest gee-whiz versions. But even then, there’s lots of discrepancies between the scriptability of the latest Netscape Navigator and Microsoft Net Explorer.
The situation makes scripting a challenge, for newcomers who may not be aware of the limitations of earlier browsers. A lot of work in my books and ancillary material goes toward helping scripters know what features work in which browsers and how to either workaround limitations in earlier browsers or raise the compatibility common denominator.
Designing scripts for a Web-site requires making some hard decisions about if, when, and how to implement the advantages scripting offers a page to your audience. For public Websites, I recommend using scripting in an additive way: let sufficient content stand on its own, but let scriptable browser users get an enhanced experience, preferably with the same HTML document.

  • Share/Bookmark

How about 3+4+”8″ in javascript?

Sunday, April 25, 2010 8:57
Posted in category Javascript

Since 3 and 4 are integers, this is number arithmetic, since 8 is a string, it’s concatenation, so 78 is the result.

  • Share/Bookmark

In javascript what is the difference between a confirmation box and an alert box?

Saturday, April 24, 2010 9:01
Posted in category Javascript

The Confirm box displays two buttons namely OK and cancel whereas

an alert box displays only one button which is the OK button.

  • Share/Bookmark

True PHP Developer Definition

Friday, April 23, 2010 15:26

In my opinion a true developer is someone who is more focused on business goal and application design than coding. PHP for developer is just a tool – a very flexible one indeed and very easy to start with – but it also offers great possibilities even for more experienced programmers. The true developer would follow the same path in PHP as he would do in Java or C#

I would say a scripter is – by comparison – someone who completes his task with PHP without concern for application structure and business model – just to finish things off, and PHP is a dangerous tool for that because of its relative simplicity and great popularity. Scripter forced to use programming language other than PHP would almost surely be confused and have to rethink his whole approach to the problem.

So I’d say this is what separates those two kinds of IT workers.

  • Share/Bookmark

Are Cyber Criminal GEEKS?

Thursday, April 22, 2010 7:00
Posted in category WWW - Internet

Governments of the Industrial World, you weary giants of flesh and steel, I come from Cyberspace, the new home of Mind. On behalf of the future, I ask you of the past to leave us alone. You are not welcome among us. You have no sovereignty where we gather.”
These lines have been quoted by John Perry Barlow, in A Declaration of the Independence of Cyberspace.

Now how far did this independence affect the cyber world? It was affected to the point where the question arises are we safe? What kind of independence in this? where anyone can invade anyone’s privacy? But in every world there exist the good, the bad and the ugly.
How ugly they can get. Everyone knows but no one can measure.
Who they are? They are simple human beings like us. Not exactly like us but more intelligent, sharp and quick. Their world has given them a new name the ‘cyber criminals’. But are they really the bad guys.
Yes they Are, No They Are Not.
Confused?
How can a criminal be a criminal and still be a GEEK? Or how can a GEEK be a criminal?
My experience so far and the cases I have come across have proved that criminals are criminals, and geeks are geeks. When they fail to realize the borderline between black and white and cross legal and social boundaries that is when things take a new turn and a new direction.

But is this the only world in which we dwell? There are many out there who have been directly or indirectly affected by the geeky or techy terrorism.We have very conveniently secured our world through expensive security alarms and security officials with guns and rifles in their hands 24/7.

“… Cyberspace is real. And so are the risks that come with it.”
President Barack Obama, 29 May 2009

The creation of cyberspace has brought us to a vulnerable point where we are not safe even if we think we are. With satellite filtering images and spotting terrorists criminals have gone completely underground. Or should I say invisible? Let me put it in a more appropriate manner “virtual”.

These virtual beings then attack virtually. Hacking is not a child’s play neither is spamming. These require expertise and extensive skills. In the real world you can find, trace and stalk and punish the criminals. But whatever is virtual is invisible; you cannot stalk the stalkers, cannot find them and cannot stop them. They might be present anywhere and everywhere in the world.

That is what makes them the GEEKS. as quoted above it is the mind’s game “Cyberspace, the new home of Mind”. You have to be ready with a plan every passing minute.

‘Terrorist Geeks aim at‘

The aim of these geeks varies from criminal to criminal or should I say geek to geek. Some indulge in these activities just for the sake of fun. Others, only to sharpen their skills, and still others for revenge. These are the most wanted and the most dangerous, because once they establish their plan they never stop. The execution of these plans can ruin businesses and most importantly, lives.

Now how would you define such type of terrorism in which you have to be extremely intelligent, smart, and clever and an intellectual? And above all educated and equipped with the latest technologies.

If we have techies making softwares all the time, then there are those who have the ability of making anti-software plans as well.

Fraud, stalking, spamming these are just a few examples

Staying Private is ‘NOT AN OPTION’. Once you are on the cyber world you are in the open. Is there any way that we could remain on the internet and at the same time stay private? Well a few days back I reading Mark Zukkerberg quote ‘The Age of privacy is over’ made me realize, that it was over way before we realized it was.

And then privacy settings from Facebook disappeared. Leaving everyone visible to everyone else.

Solutions

Are there any solutions to these problems? Everybody would want to make sure that we have the cyber tools necessary to investigate cyber crimes and to be prepared to defend against them and to bring people to law who commit it. Are we considering this or are we not? Are we making plans for safeguarding ourselves from password ‘123456’ security breach?

We will create a civilization of the Mind in Cyberspace. May it be more humane and fair than the world your governments have made before?
Davos, Switzerland
February 8, 1996

This world which exists beyond the real world is what we call the cyberspace. This is the world where we face unexplainable glitches all the time. It is loaded with risks. And cyber crimes cannot be stopped. One security breach and the rest is history. Many hope and discover ways of stopping and stemming the root cause of such thefts but the issue remains unstoppable.

All these assumptions and questions impact all of us. It is high time now that we should address these questions or else we will have to answer tougher questions. Because without solutions things can get uglier.

  • Share/Bookmark