A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11337 Flash Movies | 1 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 5828 Flash Sites | 0 New Flash Links
What's New | Top 100 Flash Site

Featured Site

» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.


Random Links | Add your own Flash Related Links
Flash Tutorials 1280 Tutorials 7 New Tutorials Added!
What's New | Top100

» Make a Flash Slide Show Screen Saver
» Simple flash making tutorial for thanksgiving
» Create flash banner for website
» Create xml slideshow with free template
» How to Insert a Multilingual Subtitle Into Your Flash Video Studio
» How to Create Cool Halloween Slideshow
» Debugging flash using the Firebug console
» Create Flash Slideshow on Blogger
» FLASH TRICKS IN WEB ADVERTISING: FLASH BANNERS
» Unknown Tag: Title10
Random Tutorial | Add Site

Trading Customer Accounting (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Backend

Categories Installing Apache 2.0, PHP 4.2, MySQL 3.23, and PHPMyAdmin
Author: Jeffrey F. Hill | Website: http://www.flash-db.com |

 
Page 5
«prev 1 2 3 4 5 6 7 8 9 next»

Exercise's and Fun configuring PHP

Exercise:  Sending Email with PHP from your local computer.  
This will work depending on if your ISP does not specifically restrict it.  Open up the PHP.ini (c:\windows\PHP.ini) file and find the following lines that look like this:

; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from =
me@localhost.com

Change this to:

; For Win32 only.
SMTP = mail.yourISP.com

; For Win32 only.
sendmail_from = YourName@YourSite.com

The SMTP setting 'mail.yourISP.com' should be the same outgoing SMTP setting you have specified in Outlook.  As long as you can send and recieve email from Outlook and have the username and password set in Outlook, you'll be able to do the same with PHP.  (Remember to Restart Apache after you have made the change to the PHP.ini file!). 

You test this by creating a file called:  EmailTest.php and placing this in your htdocs folder.  Add the following to this file:

<?php
$FromName = "Jeff Hill";
$FromEmail = "Jeff@Flash-db.com";
$ToName = "Someone";
$ToEmail = "SomeTest@someemail.com";
$ToSubject = "Testing Email from my Computer";
$Message="This is a test - hopefully I get this email";

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FromName." <".$FromEmail.">");
print "Success, the Email has been sent to $ToEmail, they should be receiving it shortly.";
?>

Then run this by opening up a browser window to the URL:  http://localhost/EmailTest.php.  If you want to create a flash movie that allows you to send email.  Remove the first 6 lines from this script - then create a flash movie with corresponding Input text boxes with the same variable names - such as FromName, ToEmail, Message etc.  Then make a button with the following actionscript on it:  loadvariablesNum("EmailTest.php", 0, "POST");  this will send the variables a user enters to the modified script and send the email.  (This is a very very basic method - but hopefully you get the idea).  Make sure that the swf is in the same directory as EmailTest.php.  Also note that you can not use the "POST" method from within the Flash editing tool ie "Test Movie" (you can use GET however) - so you'll have to run this in a SWF in a browser, ie http://localhost/Email.swf.  For more information on creating an Flash Email client - check here.


Exercise:  Enabling Additional PHP Extensions
Along with everything else that PHP can do - their are tons of additional extensions you can load that cover just about everything and anything you can think of:  From writing and manipulating Flash, PDF, Image files from code to special xml functions to secure shopping cart extensions.  Most of the time it's hard to convince your systems admin to enable some of these extensions for you if your in a shared hosting environment - but in this case since we are the systems Admin we can do whatever we want.  

Open up the PHP.ini file again (see how much the shortcut on your desktop helps).  Then find an area marked by ;Windows Extensions followed immediately by a long list of items that look like:  ;extension=******.dll.  For this example where going to install the Ming Extension and the GD Extension.  

Remove the semi-colon ;  from the beginning of these two extensions (ie ;extension=php_ming.dll to extension=php_ming.dll).  Save the PHP.ini file and restart Apache.  Now your able to use all of the Ming Functions as well as all of the GD functions.  (Ming is a set of tools that allow you to create SWF movies on the fly with Code) (the GD library is a set of functions that allows you to create and manipulate images with code).  


Exercise:  Parsing .html (and other file types) as PHP - with Apache and .htaccess files.
(This is optional like all the other exercise's).  You can add a couple lines to either the main Apache httpd.conf file or to .htaccess files in specific directories to parse certain file types as PHP.  This is useful if you don't want to others to know what type of scripting language your using.  With the following line of code you can parse .html files for PHP code - meaning that files ending with .html can be used in the same way as files ending with .php.

Add this line of code to either the Apache httpd.conf file or to a .htaccess file in a specific directory:
AddType application/x-httpd-php .html

Where not limited to being able to do this with just .html type files.  You can do this with basically any type of file.  For example if we wanted someone to think that we where using ASP instead of PHP we could add this line:
AddType application/x-httpd-php .asp 
This would allow you to parse all .asp type file's as PHP (obviosly they have to contain PHP code however and not ASP code).

Try to have fun with it!  I like to make up my own File Extensions such as .Jeff
AddType application/x-httpd-php .Jeff
Now I I can create files like Testing.Jeff  - Put some PHP code in their and open up http://localhost/Testing.Jeff  And that file will be parsed as PHP.  With your own file extensions parsed as PHP on your site - anyone taking a look at your site will be like what the heck is going on here..  (If you really don't want people to know what your using change this line in the PHP.ini file expose_php = On to expose_php = Off).  Some really large sites will do this to avoid giving a potential hacker even the slightest clue as to what Scripting language their using.

Next we'll Take on installing MySQL

«prev 1 2 3 4 5 6 7 8 9 next»

» Level Advanced

Added: : 2002-05-08
Rating: 9.19 Votes: 107
Hits: 3275
» Author
Jeffrey Hill is a freelance web developer from Boulder, Colorado. He specializes in creating and developing dynamic database driven Flash content, applications, and content management systems. Specialty's include SQL, PHP, Perl, XML, web services, and Flash clients for web services.
» Download
Download the files used in this tutorial.
Download (30 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs