Friday, May 6, 2011

PHP Tutorial Part 2 - Displaying Information & Variables

Introduction

In the last part of the tutorial I explained some of the advantages of PHP as a scripting language and showed you how to test your server for PHP. In this part I will show you the basics of showing information in the browser and how you can use variables to hold information.

Printing Text

To output text in your PHP script is actually very simple. As with most other things in PHP, you can do it in a variety of different ways. The main one you will be using, though, is print. Print will allow you to output text, variables or a combination of the two so that they display on the screen.

The print statement is used in the following way:

print("Hello world!");

I will explain the above line:

print is the command and tells the script what to do. This is followed by the information to be printed, which is contained in the brackets. Because you are outputting text, the text is also enclosed instide quotation marks. Finally, as with nearly every line in a PHP script, it must end in a semicolon. You would, of course, have to enclose this in your standard PHP tags, making the following code:


print("Hello word");


Which will display:

Hello world!

on the screen.

Variables

As with other programming languages, PHP allows you to define variables. In PHP there are several variable types, but the most common is called a String. It can hold text and numbers. All strings begin with a $ sign. To assign some text to a string you would use the following code:

$welcome_text = "Hello and welcome to my website.";

This is quite a simple line to understand, everything inside the quotation marks will be assigned to the string. You must remember a few rules about strings though:

Strings are case sensetive so $Welcome_Text is not the same as $welcome_text
String names can contain letters, numbers and underscores but cannot begin with a number or underscore
When assigning numbers to strings you do not need to include the quotes so:

$user_id = 987

would be allowed.

Outputting Variables

To display a variable on the screen uses exactly the same code as to display text but in a slightly different form. The following code would display your welcome text:





As you can see, the only major difference is that you do not need the quotation marks if you are printing a variable.

Formatting Your Text

Unfortunately, the output from your PHP programs is quite boring. Everything is just output in the browser's default font. It is very easy, though, to format your text using HTML. This is because, as PHP is a server side language, the code is executed before the page is sent to the browser. This means that only the resulting information from the script is sent, so in the example above the browser would just be sent the text:

Hello and welcome to my website.

This means, though, that you can include standard HTML markup in your scripts and strings. The only problem with this is that many HTML tags require the " sign. You may notice that this will clash with the quotation marks used to print your text. This means that you must tell the script which quotes should be used (the ones at the beginning and end of the output) and which ones should be ignored (the ones in the HTML code).

For this example I will change the text to the Arial font in red. The normal code for this would be:




As you can see this code contains 4 quotation marks so would confuse the script. Because of this you must add a backslash before each quotation mark to make the PHP script ignore it. The code would chang
e to:




You can now include this in your print statement:

print("Hello and welcome to my website.");

which will make the browser display:

Hello and welcome to my website.

because it has only been sent the code:

Hello and welcome to my website.

This does make it quite difficult to output HTML code into the browser but later in this tutorial I will show you another way of doing this which can make it a bit easier.

Part 3

In part 3 I will introduce If statements.

news sources from : www.freewebmasterhelp.com

PHP Tutorial Part 1 - Introduction

Introduction

Up until recently, scripting on the internet was something which very few people even attempted, let alone mastered. Recently though, more and more people have been building their own websites and scripting languages have become more important. Because of this, scripting languages are becomming easier to learn and PHP is one of the easiest and most powerful yet.

What Is PHP?

PHP stands for Hypertext Preprocessor and is a server-side language. This means that the script is run on your web server, not on the user's browser, so you do not need to worry about compatibility issues. PHP is relatively new (compared to languages such as Perl (CGI) and Java) but is quickly becomming one of the most popular scripting languages on the internet.

Why PHP?

You may be wondering why you should choose PHP over other languages such as Perl or even why you should learn a scripting language at all. I will deal with learning scripting languages first. Learning a scripting language, or even understanding one, can open up huge new possibilities for your website. Although you can download pre-made scripts from sites like Hotscripts, these will often contain advertising for the author or will not do exactly what you want. With an understanding of a scripting language you can easily edit these scripts to do what you want, or even create your own scripts.

Using scripts on your website allows you to add many new 'interactive' features like feedback forms, guestbooks, message boards, counters and even more advanced features like portal systems, content management, advertising managers etc. With these sort of things on your website you will find that it gives a more professional image. As well as this, anyone wanting to work in the site development industry will find that it is much easier to get a job if they know a scripting language.

What Do I Need?

As mentioned earlier, PHP is a server-side scripting language. This means that, although your users will not need to install new software, you web host will need to have PHP set up on their server. It should be listed as part of your package but if you don't know if it is installed you can find out using the first script in this tutorial. If you server does not support PHP you can ask your web host to install it for you as it is free to download and install. If you need a low cost web host which supports PHP I would recommmend HostRocket.





Writing PHP

Writing PHP on your computer is actually very simple. You don't need any specail software, except for a text editor (like Notepad in Windows). Run this and you are ready to write your first PHP script.

Declaring PHP

PHP scripts are always enclosed in between two PHP tags. This tells your server to parse the information between them as PHP. The three different forms are as follows:








All of these work in exactly the same way but in this tutorial I will be using the first option (). There is no particular reason for this, though, and you can use either of the options. You must remember, though, to start and end your code with the same tag (you can't start with for example).

Your First Script

The first PHP script you will be writing is very basic. All it will do is print out all the information about PHP on your server. Type the following code into your text editor:



As you can see this actually just one line of code. It is a standard PHP function called phpinfo which will tell the server to print out a standard table of information giving you information on the setup of the server.

One other thing you should notice in this example is th
at the line ends in a semicolon. This is very important. As with many other scripting and programming languages nearly all lines are ended with a semicolon and if you miss it out you will get an error.

Finishing and Testing Your Script

Now you have finished your script save it as phpinfo.php and upload it to your server in the normal way. Now, using your browser, go the the URL of the script. If it has worked (and if PHP is installed on your server) you should get a huge page full of the information about PHP on your server.

If your script doesn't work and a blank page displays, you have either mistyped your code or your server does not support this function (although I have not yet found a server that does not). If, instead of a page being displayed, you are prompted to download the file, PHP is not installed on your server and you should either serach for a new web host or ask your current host to install PHP.

It is a good idea to keep this script for future reference.

Part 2

In this part I have introduced you to the basics of writing and running PHP. By this time you should now know if your host supports PHP and should have a basic understanding of how PHP scripts are structured. In part 2 I will show you how to print out information to the browser

news sources from : www.freewebmasterhelp.com

Friday, January 8, 2010

Penetrating TM PC Security Protection

If you're a fan of software protection for windows, you must be familiar with this software. PC Security is a software protection for files, system, boot and others equipped with protective fiture fiture-interesting. To be able to enter and modify proteksinya settings, you must ident as an administrator for PC security and it will be asked for a password.

So you can login without a password through, how search sdeamon.exe file name and file winwd.exe which is innate PC Security TM, dihidden file from windows, so go through DOS. Usually located in the directory c: \ windows or c: \ windows \ system. Delete these two files and you will be able to enter the PC Security TM easily and without being asked to change password settingnya. Good luck

Protect files

Protect files or folders in a way nge-rename the file or folder by using alt + 255 (or with other characters is a combination of alt + number) has a flaw that the file can still be seen in windows 9x environment as that will make people who see the curious atawa want to know.

In order not to be seen or be hidden files how to change the name of the file (eg file name is try it from DOS type: "ren, try (alt +255) new locker with hidden attribute from DOS (not windows). To open the back or cut through with ease can be used Norton Commander ..... ie when it entered the NC press the F6 and change the file name that wrote he did not look earlier....

Enabling Computer Lock Features

If you are using Windows XP but only menggandalakan password from screen saver, do not expect a high level of security from it. therefore, if you activate the checkbox On resuma, display welcome screen on screen saver, the computer can still be used by someone else who has an account on that computer. for that, you who want a higher security in Windows XP can use the Lock Computer feature in Windows XP.

So when you leave the computer, but you and the administrator, no one else can use the computer. How to enable this feature:

1. Click [Start] -> [Control Panel], then select User Accounts.
2. In the User Accounts window, select Change the way users log on or off, remove the check mark in the checkbox Use the Welcome Screen.
3. Then click [Apply Options].
4. Furthermore, if you want to lock the computer, press [Ctrl + Alt + Del] and select Lock Computer

Hide user account in Windows XP

Assessment of user: / 0
Poor Excellent
Hide user account in Windows XP
When you start the computer using the welcome screen will appear and will show all the user accounts on the computer. With the tips below you can hide the user account you want.
Click Start -> Run ---> Regedit

Key -> HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Policies \ SpecialAccounts \ Userlist
Value Name (name of user account that will be hidden
Data Type REG_DWORD (DWORD Value)
Data 0 to 1 to hide and show again.
Although the user account does not appear on the welcome screen, but you can still log in with user account, the way by pressing the Ctrl + Alt + Del two times

Search for a file system or Hidden Files

By default, Search does not search for hidden files or system files, so you can munkin not menumukan these files even though there is in the drive.
To find these, click Start, click Search, click All Files and Folders, then click on more
advanced options, Cetang Search box and Search system folders and hidden folders.

You do not need to set the Options dialog box folder in Explorer windows to show the files tesembunyi Search Companion sharing option hide protected operating system files (which hides files and system files are hidden) The Options dialog box in Windows Eplorer.

Flash disk size was not as originally

If you use a USB disk, you may have experienced irregularities in the remaining space. Say your flash disk size is 128Mb and contains half the alias 64MB. Strangely the rest of the space should still only 67MB was 20MB.Menggapa demikin. Flash disk empty actions also cause peculiarities which sometimes filled the room only to be informed of 128MB smaller. Only 50-60 MB for example. How do I get the missing space.

Flash dist is often experienced "lost space" like this after repeatedly used the data store. Actually this is not a problem, but we should get the maximum capacity of a flash disk. To try to restore full capacity to move data from flash disk to your hard dist, then re-do the format. select a quick format just after it should have been dist-capacity flash back to normal.
good luckl.
good luck

Accelerating Windows

Click Start -> Run -> type "regedit
Sign in to each section below:
[HKEY_CURRENT_USERControl PanelDesktop] -> Change the following match ..
"AutoEndTasks" = "1"
"HungAppTimeout" = "3000"
"MenuShowDelay" = "0"
"WaitToKillAppTimeout" = "3000"

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorer]
-> Right click add a DWORD value "DesktopProcess"
-> Right click on the item "DesktopProcess" modify this turn into a "1"
[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun]
[HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionRun]
-> Delete unneeded registers (the register contained therein is the startup process that will run every time windows login)
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon]
-> Right click add a DWORD value "EnableQuickReboot"
-> Right click on the item "EnableQuickReboot" modify this turn into a "1"
[HKEY_LOCAL_MACHINESYSTEMControlSet001Control]
-> Change the following as ...
"WaitToKillServiceTimeout" = "3000"
Good Try

Thursday, December 24, 2009

Crack Free Premium rapid share

Here is how to earn money from internet and how u can buy a account from Rs
Free Rapidshare account and to earn money 100% Working

Free Rapidshare account and to earn money
Yes People this really works
Just follow these steps
1)Skip this step if u already own a paypal account Go to
https://www.paypal.com/
and sign up
Create a paypal premier account (this is for free)

When asked to give credit card details click on CANCEL


2)Now,Go to
http://bux.to/?r=tonken
also
http://adbux.org/?r=tonken
also
http://adcash.org/reflink.aspx?mid=52507
also
http://www.advercash.net/signup.php?ref=tonken
also
http://www.mnmbux.com/index.php?ref=tonken


Copy this links one by one in your browser....


And register.
You'll be paid just to click on their ads.
The more you click the more you earn.

How You Make Money
You make money by simply visiting websites for at least 30 seconds/visit. We will pay you $0.01 for each website you visit and $0.01 for each website your referrals visit. The best part is you can have an unlimited amount of referrals! To keep AdBux from getting top-heavy you will only earn money from those that you directly refer. This gives everyone who participates in the program a fair advantage to earn the most amount of money because you have the potential to earn more than your sponsor! Payments are issued via PayPal on a daily basis but you must request for a payment to be processed. Once requested, your payment will be issued within 24-48 hours (usually sooner). You must earn at least $10 to receive payment.


3) Finally, use this money to get your own RAPIDSHARE PREMIUM ACCOUNT

4) You could even use this money for other online shopping on e-bay or on any other sites.



.....I know the procedure is very tedious and lengthy. But I guarantee that you will succeed in your goal...
Please be patient
------------------------------------------------------------------------------


--or you can singup to International Offers

http://intoffers.com/members/register.php?ref=tonken

Tuesday, December 15, 2009

Fix Error 40 windows with XP Quick Fix Plus

There are so many free programs to fix windows and restore the common mistakes that often occur in Windows XP. But there are times when we just want to correct one error windows with just one click, such as restore the Task Manager or Registry Editor.

For that, we can use this freeware, XP Quick Fix Plus.

Quick Fix XP Plus is a small program and portable (no need to install) that serves to correct the error (error) occurs commonly in windows XP. This program has a simple display, making it very easy to use. Included 40 functions to correct common errors that often occur.



Program size is only around 584 KB is practical enough to be included in the flash and used as standard applications. Among its features are as follows (there are a total of 40 features):

  • Enabling task manager can not run (disabled)
  • Enable the Registry Editor
  • Enable Folder Options
  • Displays the Run dialog missing
  • Enable command prompt
  • Restore My Computer Properties
  • Restore the Device Manager
  • Boot.ini tab missing from MSCONFOG
  • Error windows right click
  • CD / DVD drive is lost or not recognized
  • Turn Off Icon missing from the Start menu
  • Enable autoplay CD

Very easy to use. Once downloaded, open the zip file it (extract) and run the file lfx.exe. When the mouse in place in one of the buttons, it will display an explanation and more detail the function d bottom. Just click the button to fix windows errors according to the information provided.

In addition to the program meyertakan with graphical interface (GUI = Graphical User Interface), also included qfc.exeE command line application that has 6 features, to improve the Task Manager, Registry Editor, Folder Options, Run dialog, My Computer properties and can not run a file - fle EXE.

Changes scheme Avira antivirus updates (faster)

Currently, Avira Antivirus is one of the best antivirus, especially for categories of freeware (free). One advantage is the ability to detect a virus that usually occupy the top rankings (see several articles about antivirus tests). Nevertheless Antivirus updates must be regularly performed.

Avira which provides both an online update (automatic update) or offline (manual update) has recently changed the scheme of his antivirus updates.

Previous Update Avira for about 26 MB consists of 4 files (called VDF files), which is antivir0.vdf, antivir1.vdf, antivir2.vdf and antivir3.vdf. For this version 9, Update Avira registration is divided into 32 files, start vbase000.vdf, vbase001.vdf ... vbase031.vdf. Vbase000.vdf file will have the greatest size, around 19 MB, and subsequent files are much smaller.

The existence of these files can be viewed at Avira installation folder, ie C: \ Program Files \ Avira \ AntiVir Desktop. If the folder does not yet exist, so Avira not updated with 9 new scheme.

Changes this update scheme applies only to Avira version 9, either version Free personal, Premium, Internet security, Professional, Server and other products (version 8 update scheme is the same as before). These changes aim to make the size smaller updates that improve the speed of update, because the development of increasingly rapid malware.

We have provided two types of VDF file for manual update, the VDF Antivirus Update (for Avira 9) and AntiVir iVDF update (for Avira 8). For Direct Download, right-click the following link and select Save link As ... (rather large size of about 23 MB - 26 MB)

  • Update Avira 9: Download VDF (multiple VDF)
  • Update Avira 8: Download iVDF (container VDF)
For more information or any product on the support, please see the download location More at http://www.avira.com/en/support/vdf_update.html

After downloading this file, to update the manual process to stay open Avira and open this file via the menu Update> Manual Update. When finished, the next update process should be faster by using the automatic update (with internet connection).
Automatic Update

Automatic updates can be done if our computers connected to the internet. If Avira version 9 is still using the old version update, then the first update process can be done by typing the following command in the Run menu (Start Menu> Run):

C: \ Program Files \ Avira \ AntiVir Desktop \ update.exe / DM = 0 / NOMESSAGEBOX / receivetimeout = 180

For 64 operating system using the following command:

C: \ Program Files (x86) \ Avira \ AntiVir Desktop \ update.exe / DM = 0 / NOMESSAGEBOX / receivetimeout = 180

Automatic Update process the first time will probably require a relatively long time (depending on internet connection). But the next update will be much faster. Furthermore, although the 8 is still supported Avira updates, but it is advisable to use the latest version, especially if you use Avira Free Personal.
By: ebsoft.web.id/

Monday, December 14, 2009

Why Drupal?

Comparing with CMS like Drupal Mambo / Joomla, Wordpress, or PHP Nuke like comparing heaven and earth. Wow, sedemikain away? When you first move to Drupal from Joomla is quite difficult to me. Understandably, this time I became a module developer for Simple Board Forum especially for module Last Forum Subject. Also as a core developer for the components that provide the ability Joomblog create a blog on Joomla. As if the great truth Drupal?

All CMS Drupal offers flexibility but offers something more. Several advantages compared to Drupal Mambo / Joomla and WordPress are:

1. Multi Sites. Built-in Drupal supports multiple manufacturing sites, this feature is not present in Joomla or WordPress.

2. Forum. Built-in Drupal has the ability to create forums.

3. Cascading Comment. Built-in Drupal supports multilevel comment (not flat). So easy to read a comment directed at the comment where.

4. Multi-type content. This is a capability built-in Drupal extraordinary. This means you can create a special content type for news, products and articles for example. This really is not just the content type categorization!

5. Cascading Unlimited Category. Joomla only supports level 1 category only, Joomla can not make the next sub-category. Built-in category Drupal achieve unlimited levels!

6. SEO, Drupal websites known for his SEO reliable.

7. A flexible template. How do you change the shape / layout of a form field? Drupal provides a template that is very flexible and easy to learn.

8. Profile. A profile is built-in ability Drupal is awesome, too. You can add fields such as ID card number, address, date of birth and so on when the user fill out the registration form! This capability is not in Joomla or WordPress.

9. Drupal select jQuery JavaScript Library consistently. While Joomla and Wordpress alternated using jQuery and Mootools.

10. The future is not clear at the Mambo / Joomla.

  • Since October 12, 2006, Joomla 1.5 Beta1 released and until October 6, 2007 new entrants 1.5 RC3. So for 1-year-kelar kelar not too!
  • While Drupal 4.7.0 appeared on 1 May 2006 (already includes AJAX features!) And 5.0 on Jan 15, 2007, only months. Even Drupal 6 Beta 1 appears on Sep 15, 2007, and Drupal 6 Beta 2 on 17 Okt2007, just 1 month! And Drupal 6 brings new features of Multi Languages increasingly makes Drupal great.

11. Support Drupal developer in more and more. And not a little good-good move to Drupal Joomla especially in countries where English is not your primary language. This is because the ability to multi languages on Drupal. Even since Drupal 5 for i18n module is the origin of multiple languages on Drupal 6!

12. CCK (Content Creation Kit). This is one of its killer feature Drupal. Just Drupal module provides a practical so that you can create a slide show application, gallery, guest book and even e-commerce with the aid of this CCK! Views module combined with the increasingly easy to serve the needs of Drupal websites can display their own customized by the user without any coding at all!

13. Hook System. API in Drupal using a system hook that proved successful. We can easily inject (hook) something on the specific content Mass. With the system in every element WEIGHT make me easy to position a new element in Drupal!

14. News Aggregator. Built-in RSS feeds is very easy on the Drupal website.

15. User Define Menu. Built-in Drupal has the ability to create new menus and even a story!

Moreover, huh? It was quite partial Drupal skills I mentioned. In short as one former Developer Mambo / Joomla I realized how great is that my Drupal URLs as the heavens and the earth. But, of course in the sky there is heaven!

Install Ubuntu 7.10 Gutsy Gibbon from a USB FLASH

For those who want to install Ubuntu 7.10 without a CD-ROM can use a USB FLASH as an alternative, a prerequisite PC must support booting from a USB port and USB flash with a minimum capacity of 1 GB.

To create a bootable USB could be in need syslinux bootable maker or other software, I use syslinux to make a bootable USB because the application already exists direpository Ubuntu.

Syslinux to install the application on Ubuntu can be done directly from the terminal console:

$ Sudo apt-get install syslinux mtools

After the installation process is complete and then mount the USB, there is usually a USB partition on / dev / sdb or / dev/sda1, and the mounting media in the folder with the usb the folder name or the name of USB label, to see a USB hard disk and partition can be a way:

$ Sudo fdisk-l

to create can be as Flsh USB with syslinux bootable enough of this type the command in the terminal console

$ Sudo syslinux-s / dev/sda1

then copy all the files on the Live CD Ubuntu 7.10 "Gutsy Ribbon" into the USB

$ Sudo cp-rp / media / cdrom / * / dev/sda1

After the file copy process is complete, rename the folder isolinux to syslinux, syslinux folder in the file name change became isolinux.bin and isolinux.cfg syslinux.bin and syslinux.cfg

When the Windows download files from the syslinux http://freshmeat.net/redir/syslinux/10177/url_zip/syslinux-3.51.zip

Then extract into the directory C with syslinux name. At the command prompt windows go into the directory c \: syslinux \ win32, use the following command to create a bootable usb disk can: syslinux-s F: (assuming the usb drive in F), then copy all the files in the Ubuntu 7.10 Live CD into the USB , we recommend using the command:

xcopy / e / h / k d: \ *.* f: (D as a CD-ROM)

Next USB FLASH already can be used as penganti Ribbon Ubuntu 7.10 Gutsy Live CD.

Your Windows shutdown Automatically

You never listen to music through your computer until you fall asleep? Or you've watched TV through the TV tuner to fall asleep and stay on your computer while you sleep? This is in addition to making your PC work continuously will also make your electric bill swells!

Jgn worry, I'll teach you some tricks to prevent it, without installing any software you can do it with ease, let's get started:

1. Click Start> Run or press window + r windows

2. Type: tsshutdn XX / powerdown
NB: XX = time you want in seconds

Suppose you want to install the timer for 1 hour, then you live typing tsshutdn 3600 / powerdown

3. If so, click OK, a confirmation window will appear with the message:
"System is shuting down in 3600 seconds"

4. Click OK on the pop up window

5. Yg Minize DOS window appears (not a DOS window in CLOSE. If the CLOSE the timer will not work)