Archive

Archive for July 2008

ASP - Creating a mailing list

Requirements:

  • Server with IIS (Internet Information Service) installed;
  • File creation. Mdb (Access format) to usernames and passwords of authorized users;
  • CDONTS component is installed on your server;

In this tutorial I will explain how to create your own personal mailing list. You must create an Access file containing a single field called Email, text type, the filename will be mail_list.mdb.

Then you need to create a form that contains a text field named email where the user can enter his email; in the action of the form write the name of the page to send the form data in my example will be attached modifica_mailing_list.asp.

Continue reading ...

ASP - Creating a protected section

Requirements:
  • Server with IIS (Internet Information Service) installed;
  • File creation. Mdb (Access format) to usernames and passwords of authorized users;
Knowledge of ASP recommended:
  • Session variables;
  • The Global.asa file;
  • The # include statement;


How many times have you thought about how to protect access to certain pages of your sites?
Now your wish can come true, by following this simple tutorial, created by myself in a simple and intuitive.

First we create the Global.asa file to be included in the root directory of our site, this file is retrieved from the server each time a user accesses the site through the browser (eg Netscape or Explorer), and executes the code in it Application_OnStart functions contained in () and Session_OnStart ().

If you close your browser window and then abandon the site will run the code inside the functions Session_OnEnd () and Application_OnStart ().

Not necessarily have to be present all four functions within the file, it depends on the needs of the programmer to use them all, some, or none.

The following is added to the code to enter if we want to protect some of our pages:

1. <SCRIPT Language=vbscript runat=server>
2. Sub Session_OnStart ()
3. Session ("flag") = 0
4. Session.Timeout = 40
5. End Sub
6. Sub Session_OnEnd ()
7. Session ("flag") = 0
8. End Sub
9. </ SCRIPT>

Continue reading ...

PHP - Creating a counter for the site

Requirements:

  • Servers with Apache installed;
  • PostgreSQL Server (SQL Server) installed;


Recommended PHP knowledge:

  • Session variables;
  • The instruction includes;
  • Knowledge of SQL;

This tutorial was tested under a Linux server with PHP 4 and PostgreSQL server with SQL, but there is nothing to try it under Windows, and if you want to use the SQL Server MySQL just replace the functions of PHP for the PostgreSQL with those of MySQL (for the reference manual on www.php.net Vai).

If you want to have an interface for Linux to edit your database, you must go to http://www.greatbridge.org/project/phppgadmin/projdisplay.php.

In this tutorial I will explain how to create a counter for their website.

You must create a database in PostgreSQL with counter name contains only one field, called hits, numeric type (int8), belonging to the table count.

Continue reading ...

Tag: , , , Categories: PHP Tags: , , ,