PHP vs CGI

PHP seems very much in vogue now - with an increasingly greater number of web hosts providing support for it. For those who have only vaguely heard of it and are not too sure what it is, this article discusses PHP and informally compares it with writing CGI scripts in Perl.

PHP is a free server side scripting language. It can be built into web servers like Apache and you can use it to generate your pages dynamically. You would probably use it in situations you would have otherwise used a CGI script for. For example, thefreecountry.com's Feedback form (among other things) uses a PHP script to generate the form and send the message to me.

1. The Language
If you are coming from a C, C++, Perl, Java or JavaScript background, learning PHP would probably be a piece of cake. In fact, you probably can get started writing your scripts almost immediately (I did).

It uses typeless variables the way Perl does, prefixed with a "$" sign and holding any data type you wish. For example, $whatever can be a variable that you can use to contain strings, numbers, whatever. If $whatever contained a number, you can increment its value using

$whatever++ ;

or

$whatever += 1 ;

or

$whatever = $whatever + 1 ;

Remind you of Perl, C, C++, Java, JavaScript? See what I mean?

2. Built-in Facilities
Unlike Perl, which is a general purpose scripting language that you can use for a wide variety of purposes (and not just generating web pages), PHP was designed from the ground up to be used for scripting web pages. As a result, it has lots of facilities built into that you may have to write yourself or use some pre-written module if you were using Perl.

For example, do you want to send email to yourself from a form on the web page? In Perl, you probably would have to code something like the following:

open ( MAIL,"|/usr/sbin/sendmail -t");
print MAIL "To: myself\@mydomain.com\n" ;
print MAIL "From: visitor\@hisdomain.com\n" ;
print MAIL "Subject: Comments from Web Form\n\n" ;
print MAIL $mainmessage ;
close ( MAIL ) ;

In PHP, the same thing would be coded as follows:

mail ( "myself@mydomain.com", "Comments from Web Form",
$mainmessage, "From: visitor@hisdomain.com" );

Nifty, huh? The same goes for other facilities like sending or retrieving a document via HTTP or FTP, etc. Since PHP was specially designed for a website, the facilities that web designers typically want in a scripting language are built into it.

Another convenience is its handling of form input. Take for example a form with a field like:



You can immediately access that field with the $dateofbirth variable. No need to parse form inputs and the like. All fields in the form are automatically converted to variables that you can access.

Accessing databases is just as easy. There are built-in facilities in PHP to access MySQL, MSQL, Dbase, Oracle, InterBase, and so on (the list is very long). Need to MIME encode your message? There's a function to do it for you too.

There're lots more. I obviously can't run through the entire list - it would take a whole book to be exhaustive. This is just to whet your appetite.

3. Generating web pages
By default anything you type in your PHP document is given verbatim to the web browser. So a simple PHP script might look like the following:


My First PHP Script

My First PHP Script
<' p>
Welcome, Internet user from IP address
. Hope you like my first
PHP page.




Notice that it looks exactly like a web page, except for the bit, which encloses the PHP script. In this case, all we want is for the script to output the visitor's IP address to the page, hence we use the "echo" function. The web server's environment variable REMOTE_ADDR is automatically made available to the PHP script via a variable of the same name (as are all other environment variables and form inputs).

There are many ways to embed your PHP script into your page, or to design your page itself. But you got the general idea. As I said, PHP was designed for web pages, so the idea of output to the server is built into its design. It makes writing such scripts a very pleasant task.

4. Debugging With PHP Vs Perl CGI

Interestingly, if you're debugging your scripts online, PHP really shines.

Normally, when a Perl CGI script goes awry, you'll get a cryptic error message in your browser: something to the effect of "500 Internal Server Error".

With PHP scripts, you get error messages pinpointing the offending lines in your code to help you locate the error. However, the message is sometimes a cryptic "parse error" or the like, so you still have to crack your head to figure out the problem. But at least you know where it occurred. Contrast that with Perl CGI scripts, where an "Internal Server Error" could have arisen from any number of causes, from a syntax error to a simple case of forgetting to make the file executable or uploading it in text mode.

Debugging offline, however, is another story. Some people have found that the Perl interpreter gives more helpful messages than the PHP interpreter, which tends to label many things as "parse error". This may change, though, as newer versions of the PHP interpreter is released.

4. What's the Catch?
While I obviously enjoy using PHP as my web scripting language, I do not claim that it is the perfect solution for all your website needs.

You might want to consider the following prior to committing yourself ot it. The list, incidentally, is not exhaustive.

a. Not all web hosts provide PHP facilities. While it is true that many also do not provide CGI access, the number providing PHP is even less!

In fact, where free web space providers are concerned, the number providing PHP can probably be counted with one hand. Indeed, even if you manage to find free web hosting with PHP access, you have to ask yourself whether you really want to depend on it for your site. There might be a day when you need to move your site, and you may be hard-pressed to find another free web host that supports PHP.

However, if you host with commercial web hosting companies, you probably will have less problems. It seems to me like the large majority of vendors support PHP, and even those who currently don't provide it plan to support it in the near future.

b. Like all web scripting languages (Perl included), debugging the script can be a pain in the neck unless you download and install your own copy of PHP. Otherwise you might spend many hours online trying to test and debug your script (unless of course it's a trivial script).

Incidentally, you can also operate your own Apache web server at home, so as to mimic the entire environment of your actual site (or as close to it as necessary).

Of course if you have a Linux box around, you're probably all set. Just dig up your installation CDROMs and install the server and PHP module from there if you've not already done so. (Most modern Linux distributions come bundled with the Apache server and PHP Apache module.)

c. It is not a general purpose language. While it has many facilities specifically catered towards web programming, it is not Perl (or C or C++ or Java). I personally however find PHP more than adequate for my web programming needs.

Windows Vista Home Basic Troubleshooting & tips

Enable New windows vista Home Basic Aero Cursors tips.

Troubleshooting tips 1
:Post-beta 2 builds, windows vista has included new Aero cursors that are not turned on by default. To troubleshooting this in vista.Follow the steps below :Right click on your desktop and select Personalize.Click on the Mouse Cursors item to select a Vista graphics different mouse cursor scheme.Change the Scheme from None to Windows vista Aero.Click OK to see the new Aero mouse cursors.

Kill Security center notification problem in Windows Vista Home Basic

Troubleshooting tips 2: windows vista security center remind you all the time about anti virus. Solution guide:- new easy way to disable the security center messages.Click on the Security Center/Windows Security Alerts logo in the system tray.Click Change the way Security Center alerts me.Select I do not want notification messages from Security Center.


Use small icons size tip for Windows vista.

Troubleshooting large Icon
The Windows vista icon size of the recently run programs list on the Start Menu is set to large by default. This is great if you like the large icons but it also cuts down on the number of recently run programs that can be displayed. Follow the steps below to give your Start Menu a cleaner look

disable large icons problem:
Right click on the Start Button and select Properties.
Click on the Customize button.
Scroll to the bottom of the list and remove the check from Use large icons.
You can now also increase the number of recently run programs in vista that are displayed to something larger than 9.
Hit OK when you are finished.


windows Vista adiitional clock
Windows Vista, you can add additional clocks to the system tray. Click the clock, and then click Date and Time Settings. Click the Additional Clocks tab. You can add one or two additional clocks to the tray and select their time zones.

Vista's word and notepad document more secure
You can create XML documents, which are more secure than regular text files or even word processor docs. Just create a document in a word processor, print(not print out ) it via the options menu, and select the XPS printer.Thats it u have secure document.

Vista Home Basic Internet Explorer Problem

If you’re annoyed by Internet Explorer’s incessant barking that you’ve lowered your security settings , launch “gpedit.msc” from either the Run command or Start Search field, navigate through Local Computer Policy / Computer Configuration / Administrative Templates / Windows Vista Components / Internet Explorer. In the rightmost pane, double-click “Turn off the Security Settings Check feature” and set it to Enabled.

Windows Vista Task manager for troubleshooting

The Windows Task Manager gives you a lot more troubleshooting information in Vista.Click ctr+alt+del, Flip to the Processes tab, and in the View menu, click “Select Columns” and add Description, Command Line, and Image Path Name. Moreover, when you right-click a process, you can select either “Go to Service(s)” or “Open File Location.” These are all long overdue options.

Displaying Run on the vista Desktop
You can create a shortcut for the Run command on your desktopFrom the Start Menu, go to All Programs / AccessoriesDrag a shortcut for Run to the desktop.

vista Displaying Run on the Start Menu
By default, Run is not shown when you open the Start Menu.To enable this:Right click on the taskbarSelect PropertiesClick on the Start Menu tabClick on the Customize buttonScroll down and check Run (it's about 2/3's of the way towards the bottom.

Allowing Network Access with Blank Passwords with Vista
Although you can log in locally without a password, by default, Vista does not allow network users to access the computer without a password. To change this setting in windows vista: Run gpedit.msc Go to Computer Configuration / Windows vista Settings /Security Settings / Local Policies / Security Options Double click on Accounts: Limit local account use of blank passwords to console login only Disable this option.

Adding the IE 7 Icon to the desktop
By default, the icon for the Vista graphics Internet Explorer 7 does not show up on the Vista desktopTo add it back in again, a registry edit is needed. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]"{871C5380-42A0-1069-A2EA-08002B30309D}"=dword:00000000 Then log off and back on again.

Resizing Partitions Vista .
Vista now has the ability to resize partitions. Right click on my Computer on vista tip desktop Select Manage Click on Disk Management Right click on a partition Select Shrink or Extend depending on what you want to do Note: As with all changes to partition sizes, have a good set of backups beforehand is a good idea.

.
Access Denied to Folders
If you are getting Access Denied errors when trying to open folderslike Documents and Settings, Application Data, Local settings: Right click on the Folder Select Properties Click on the Security tab Click on the Advanced button Click on the Owner tab Click on the Edit button In the Change owner to box, highlight your account Check Replace owner on subcontainers and objects Click on Apply Click on Yes to replace all permissions Continue to click on OK until you.

Services You Can Disable with vista
There are several services you can disable to help improve performance.
Desktop Window Manager Session Manager - Provides Desktop Window Manager startup and maintenance services.If you don't plan on using Aero Glass, you can disable this service.

Diagnostic Policy Service
- Enables problem detection, troubleshooting and resolution for Windows componentsSet to Disabled

Diagnostic Service Host
- Same as above

Diagnostic System Host
- Same as above

vista Offline Files
- The Offline Files service performs maintenance activities on the Offline Files cache, responds to user logon and logoff events, implements the internals of the public API, and dispatches interesting events to those interested in Offline Files activities and changes in cache state.

vista Terminal Services
- Allows users to connect interactively to a remote computer. Remote Desktop and Terminal Server depend on this service. If you don't use either of these, then you can disable the service in vista.

Windows vista Error Reporting Service - Allows errors to be reported when programs stop working or responding and allows existing solutions to be delivered.
Windows vista Search - Formerly this was the Indexing Service. Provides content indexing in vista.
comment: futher tips for microsoft windows vista available in future.

Computer & Less known Technologies

These article are not intended to promote illegal hacking or cracking. This site provides the information for purely academic reason/purpose.


Hacking

In this new world, development is happening in Computer Technologies which is controlling almost all sectors of life. From birth of a child to till the end of life, computer & its programs plays a major role. We can't imagine our life without a computer or programs, when we try to understand it. Most of us are ignorant about the fact. We are using mobiles, new generation cars, security systems, transportation, signal lights, office, airports, ships, nuclear facilities, telecommunication.... you name it. Starting from kitchen you can find it everywhere in your own house itself. Everything is in one way or the other controlled by computer. Internet & emails, web sites, Information at fingertips, huge databases, one cannot think without these in this modern era.

Hacker is the name meant for the people who thinks & develops programs like internet & email. But now when we hear the word, Hacker, we may get annoyed, because the word society considers as the spoiled brains of computer world, who makes distruction. Those who are finding loopholes in useful programs & destroying it. In fact, Hacking & Cracking are very different, one should learn about the difference.

History of Hacking
In 1960 around, the word "Hacker" is formed in Massachusetts Technology Institute in USA. On that time, the word is considered in its positive sense. It is to find out the products which did not get after sales technical support and those who does this is known as Hacker on that time. Richard Stalman, the founder of GNU (a free operating system) is one of the Hacker in MIT on that time. When the multi user Systems came, then also the hacking was useful.
But when some started using the system for making errors in Telephone networks & computer, the word got its present not so pleasant meaning. Disbursing destruction as it rolls on, those innocent popular hackers are also got in between.

In 1985, to differentiate between those who construct & those who destruct, another word emerged, "Cracker". Hacker for those intellectuals who are Making/ building programs in net & Cracker is those who are destructing/ make illegal programs. But the word Hacking still remains in the common people's mind same as Cracking.

At first, around 1970s, one of the known Cracker was Captain Crench, he make use of the loopholes in Inband Signalling Telecommunication, USA's network. He used to make calls of Inband Signalling's frequency.

In 1980, when the personal computer (PC) started became popular, Virus program & Worm program started distributing among PCs. People started watching it as part of Hacking and when the Internet became a public network around the last of 1980, Cracker's started working in Internet.

On that time, popular Bulletin Board System (BBS) service is widely used by Crackers. The popular instrument was telephone & crackers misused the facility through BBS. Government in USA feared that this will throw the economy in jeopardy and they used (Federal Beauro of Investigation, USA) FBI to find the Cracker's & cease the instruments they use. This is considered as first legal action against Crackers.

1990 saw the wide use of World Wide Web (www) and Cracking became common. The number of Crackers are also increased. Those can be categorized as Hobbiest, Professional and Researchers. Those who are cracking computer networks to find the faults for fun comes in first category. The other category, professionals, works for financial gain while Researchers finds the networking loopholes and inform the authorities.


Cracking
Why Cracking
Methods of Cracking
Buffer Overflow

Social Engineering
Trojans

Fishing
Advanced Fee Fraud
Front Door & Bruit Force Attack
Dictionary Program Hacks
Bugs & Back Doors
Denial of Service
Virus
Vulnerability Scanner
Worms
Logic Bombs
Ransom wear
How to prevent Cracking
Intrusion Detection System
Anti Virus Softwares
Encryption
Firewall
Controlling, New Trends
Cracking in real life

NetBeans 5.5

The NetBeans IDE is a free, open-source Integrated Development Environment for software developers. The IDE runs on many platforms including Windows, Linux, Solaris, and the MacOS. It is easy to install and use straight out of the box. The NetBeans IDE provides developers with all the tools they need to create professional cross-platform desktop, enterprise, web and mobile applications.


NetBeans IDE Add-ons

1. Mobility Pack
You can build easy and powerful mobile applications with visual tools.
2. Visual Web Pack
Drag and drop components to visually construct web applications.
3. Enterprise Pack (XML Schema, WSDL, BPEL, Secure Web Services, UML)
Drag and drop components for modelling and SOA application development
4. Profiler
Find bottlenecks and memory leaks in your applications.
5. C/C++ Pack
Create C/C++ applications from within the NetBeans IDE.

JavaScript :: Images fly around

javascript:R=0;x1=.1;y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i}setInterval('A()',5); void(0)

Copy & Paste in your browser address bar & press Enter

JavaScript to Flash a Text Message!

javascript:function reverse(){var inp = "!!koobparcs s`aviS ni ecin gnihtemos etirw dna oG.tol a segassem ruoy sessim aviS";var outp="";for (i = 0; i <= inp.length; i++) {outp=inp.charAt (i) + outp;}alert(outp) ;};reverse();

Copy Paste in your browser's address bar & press enter

Internet Search Engines





A search engine is an information retrieval system designed to help find information stored on a computer system, such as on the World Wide Web, inside a corporate or proprietary network, or in a personal computer. The search engine allows one to ask for content meeting specific criteria (typically those containing a given word or phrase) and retrieves a list of items that match those criteria. This list is often sorted with respect to some measure of relevance of the results. Search engines use regularly updated indexes to operate quickly and efficiently.

Without further qualification, search engine usually refers to a Web search engine, which searches for information on the public Web. Other kinds of search engine are enterprise search engines, which search on intranets, personal search engines, and mobile search engines. Different selection and relevance criteria may apply in different environments, or for different uses.

Some search engines also mine data available in newsgroups, databases, or open directories. Unlike Web directories, which are maintained by human editors, search engines operate algorithmically or are a mixture of algorithmic and human input

Yahoo! Search
Yahoo! Search helps users find information, news, images, video, products, local services, and answers from around the Web.search.yahoo.com

Google (Nasdaq: GOOG)
Main site for the Google search engine, finding web sites that match a user's query. Also includes Image Search, Local Search, Google News, and Froogle.www.google.com

Dogpile
Dogpile fetches and ranks results from multiple search engines, letting you search for key words, pictures, audio, video, news, or phone numbers from a single page. ...www.dogpile.com

AltaVista
AltaVista provides web and newsgroup search engines, as well as paid submission services.www.altavista.com

WebCrawler
Metasearch results from popular engines and directories.www.webcrawler.com

HotBot
Search engine that offers custom filters, skins, and access various other engines.www.hotbot.com

MetaCrawler
Search service that relies on the databases of other search engines.www.metacrawler.com

AllTheWeb
Search engine which indexes web pages, as well as multimedia, audio, FTP, PDF, and MS Word files from around the world.www.alltheweb.com

Search Engine Watch
Provides tips and information about searching the web, analysis of the search engine industry, and help to site owners trying to improve their ability to be found in ...www.searchenginewatch.com

Lycos
Official site for Lycos, the online destination site combining elements of navigation, community, and commerce.www.lycos.com

Ask.com
The Ask.com search engine allows users to find online information by asking a question, entering a phrase, or giving a key word. Formerly Ask Jeeves.www.ask.com

Vivísimo
Offers organized search results with document clustering. Makers of the Clusty search engine.www.vivisimo.com

WiseNut
Employs a context-sensitive ranking algorithm to return search results by degrees of relevance.www.wisenut.com