Pages

Thursday, March 18, 2010

Baby Step 2 to Using Sign-In with Twitter

This is Baby Step 2 of using Sign-in with Twitter

Click here for Step 1.
Click here if you want more practice with HTML.

Unlike HTML, which you can write and view on your own computer before uploading to the internet, PHP cannot usually be viewed on your personal computer. That's because PHP is a server-side scripting language, which means it relies on information that is on a remote server to make the page look different depending on what the viewer does at their local computer.

If you don't have a server, you won't be able to use PHP or create a website that lets people Sign-In with Twitter. I highly recommend this affordable server provider, because they always update with the latest versions of PHP and other technologies.

Beyond this point, I'll show you what to do once you do have a server...

2. Writing a 10 second PHP program:

A. open notepad.exe or whatever program you use to type on your computer
B. enter the following 3 lines
<?php
phpinfo();
?>

C. save the program as myphp.php(the ".php" is the file extension, which tells the computer what type of file this is)
D. close myphp.php
E. upload the file to your server (remember the location)
F. use a web browser to visit the location
http://www.example.com/foldername/myphp.php
G. notice all kinds of information about the version of php you are using, if it's installed. If it's not installed contact your server provider, or switch to mine.
H. open notepad.exe or whatever program you use to type on your computer
I. enter the following 3 lines
<?php
echo("My first PHP program!");
?>

J. save the program as my1stphp.php(again, the ".php" is the file extension)
K. close my1stphp.php
L. upload the file to your server (remember the location)
M. use a web browser to visit the location
http://www.example.com/foldername/my1stphp.php
N. notice that "<?php" and "?>" don't show up in the browser. These are instructions that tell the browser what to do, not what text to show

No comments:

Post a Comment