Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Remote user login

Posted on 1998-08-26
2
Medium Priority
?
177 Views
Last Modified: 2013-12-25
How to write a cgi scripts with perl that is able to add remote user to a certain homepage?
Eg: A user need to register himself before can surf into certain homepage. How the cgi work to receive user's input and keep it at a place, then, when second time the user come again, he is able to login by entering the password that he gave when he first register.
0
Comment
Question by:sping
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Expert Comment

by:evilgreg
ID: 1828316
Are you using .htaccess, or is it all cgi based? In other
words, is this page that is supposed to be restricted a
known URL, or is it only accessed after they have gone through
a username/password form page?

Also, what system is this on? Unix?
0
 
LVL 3

Accepted Solution

by:
John P John earned 300 total points
ID: 1828317
This should do the needful and sort ur problem
TRY IT OUT
********************************************
# Three variables to keep track of the user inputs

$login=Variable1
$email=Variable2
$pagename=Variable3


# Write the login name and email address to a separate file for confirmation
# when they want to edit their page

open (FILE, ">>$data") || die "I can't open $data\n";
print FILE "$login&&$email&&$pagename\n";
close(FILE);

# Here we check the details of the user

sub checkuser {
open(FILE, "$data") || die "I can't open $data\n";      

      while(<FILE>) {
      chop;            
      @all = split(/\n/);

      foreach $line (@all) {
      ($loginname, $loginemail, $loginpagename) = split(/&&/, $line);

      if($loginname eq "$login" && $loginemail eq "$email" && $loginpagename eq "$pagename") {
            $match = 1;
            &edit($loginpagename);
                     }
            }
      
      }

#  Please add ur subroutine to open

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question