// ************************************************************ // SAINTlogin (c) www.saintlogin.com // // Implementation files for PHP (Unix, APACHE) web servers // release 1.2 // ************************************************************ Thank you for downloading the SAINTlogin implementation files, please follow these directions to setup a test access page on your Unix/Apache Webserver. - You may need to have an FTP access to the directories of your web pages. ... - Make sure PHP language is installed and functional on your Server. - Unzip the downloaded SAINTlogin file, make sure you unzip with full path extraction, you should have these directories extracted to the desired web folder -protect -access -lib -tutorial - Copy these files, maintaining the directory structure, to your website root directory, using either FTP or copy (if you have direct access to the server). ######CONTENTS###### - The access directory contains a prototype login page named "saintlogin_access.htm". You can customize this page as needed, it will be the login page to your SAINTlogin protected site. - The lib directory contains a modified release of the 'nusoap' library, form more informations on this component please refer to http://dietrich.ganx4.com/nusoap/index.php The only modification made to this library regards the timeout for tcp/ip connection which has been set to 60 seconds to comply with SAINTlogin timeout requests. - The tutorial directory contains a sample step by step implementation, with code fragments that can be used as a reference if you wish to learn and/or customize your SAINTlogin implementation. ######TESTING###### - To test the implementation, just use a browser, point to your website,and have access to the "saintlogin_access.htm" page, (for example typing as address : www.yoursite.com/test_site/saintlogin_access.htm) (Please have your Internet Explorer or Netscape updated to the latest version available !) After pressing the login button, in a few seconds you should see an image displaying a number. Call this number using a cell-phone, if registration was not made, you should be redirected to the "noaccess.php" page. -Now register to a demo service using your cell-phone at the following link http://www.saintlogin.com/SAINT_WS/demo/saintregistration.php (You will be prompted to send an SMS containing a pass-code to a number displayed) -After registration has been made, and the required SMS sent, retry login at the "saintlogin_access.htm" page, if the browser is automatically redirected to the index.php page then... ...Many Compliments ! You have successfully installed SAINTlogin ! ######CUSTOMIZATION###### - There are 4 pages which you can modify that represent the standard SAINTlogin replies : If the behaviour of the prototype pages is kept as original, the SAINTlogin scripts here provided will automatically redirect to one of these pages, passing to them the values indicated here between '<' and '>' : * IF user has not been registered (not known) his browser is automatically redirected to "noaccess.php?number=" * IF user has been correctly validated (recognized) his browser is automatically redirected to "index.php?Number=+&nick=" * IF timeout (SAINTlogin has been waiting call for more than 50 sec) his browser is automatically redirected to "timeout.htm" * IF NO CALLER ID has been received with the call his browser is automatically redirected to "nocaller_id.htm" Please note that you won't be able to access the 'index.php' page unless correctly validated by SAINTlogin ! ---------------------------------------------------------------------------------------------------------------------- -For the purpose of protecting your site, may need to make minor modificaions to this file : saintlogin_php.php In this file the following function can easily be modified : WaitForCall_function(...) in which a call the SAINTlogin Webservice is made to check for a valid call received. To set your global variables needed for user/session identification, just check the $result variable and grant your user or not setting a session variable and an optional cookie for user identification during session. You may simply add your required code to this 'if' statement : /* UN-COMMENT THIS CODE AND MODIFY AS NEEDED TO GRANT ACCESS TO YOUR SITE if ( strncmp($result,"noaccess",8)==0 || strncmp($result,"timeout",7)==0 || strncmp($result,"nocaller_id",11)==0 ) { // No access for this user !!! } else if (strncmp($result,"index",5)==0) { // User has been recognized ! // Set YOUR USER Session variable // Set YOUR COOKIE if requested } */ THAT'S ALL... FOLKS !!! If support is needed contact us at support@saintlogin.com , thank you !