By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,834 Members | 2,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,834 IT Pros & Developers. It's quick & easy.

how to get these basic modules

100+
P: 236
Hi All,

How does we get these standard modules including the html interface so that we can integrate with our perl system with mysql database. Can even consider purchase.

a) user registration
b) search engine
c) pop out windows

Cheers...
Andrew
Nov 13 '08 #1
Share this Question
Share on Google+
20 Replies


Ganon11
Expert 2.5K+
P: 3,652
Search the CPAN (Comprehensive Perl Archive Network) for some of what you're looking for. I'm sure someone has written a standard module that you can use.
Nov 13 '08 #2

KevinADC
Expert 2.5K+
P: 4,059
There is no user registration module, pop-up module (which perl can't do anway and has been explained previously ), or search engine module. Modules are what you use to write programs.

CPAN does have a scripts respository buts its pretty spares and is not the focus of CPAN. I doubt there are any scripts that do what he wants but he can look:

http://www.cpan.org/scripts/index.html

What he wants is to search script archives like www.hotscripts.com or hire a programmer which I think has also been suggested.

www.odesk.com
www.elance.com
Nov 13 '08 #3

100+
P: 236
Hi Guys,

The information and websites are cool. Thanks! Btw, any sites to get cool and reliable programmers?


Cheers...
Andrew
Nov 13 '08 #4

KevinADC
Expert 2.5K+
P: 4,059
Hi Guys,

The information and websites are cool. Thanks! Btw, any sites to get cool and reliable programmers?


Cheers...
Andrew
Andrew,

Did you look at my post? There are two links at the end. I have no idea if the programmers a "cool" but you check feedback to determine if they are competent and reliable.
Nov 13 '08 #5

100+
P: 236
Hi Kevin,

a) Thanks! I was so excited to see the samples scripts that I did not see your elance.com and the other .com. The information is enough. Sorry I did not see clearly.

b) Btw, will perl cookbook help to provide us some simple sample examples like user registrations ??

c) And I want to want to create html accept user particulars and then to excute perl script to process them and then when user particulars are not correct will link back to original html page with relevant user particular's field error. Is it possible to include a statement(which perl function or module can do that?) in perl script which does that? And what is the reference website if possible?

Kindly advise.

Cheers...


Thanks and Best Rgds,
Andrew

example :

1) keyed in user registration of username in html page page and submit html to perl script
================================================== ========
html example
Username : XXXXX



2) perl script processed and find the username duplicate and can redirect with error in orirginal html
=========================================

perl script example

XXXXXXXXXXXXX
XXXXXXXXXXXXX
YYYYYYYYYY


3) html with user particulars registration error printed.
======================================

Username : ___________ (*invalid username, please key in and submit again)
Nov 15 '08 #6

KevinADC
Expert 2.5K+
P: 4,059
I don't know if the perl cookbook has a"recipe" that will help you.
Nov 15 '08 #7

100+
P: 236
Hi Kevin,

Thanks again. I managed to find the redirect command in perl. Below is the code. I couldnt explain well enough.


Cheers...
Andrew

Expand|Select|Wrap|Line Numbers
  1.  
  2. #Newly added 14th nov 08
  3. if ($agree_field == Annonymous)
  4. {
  5.      my $url = "http://localhost/amform.html";
  6.  
  7.  
  8.   #my $req = HTTP::Request->new($url);
  9.   #my $res = LWP::UserAgent->new->request($req);
  10.   #print $res->is_success ? $res->content : "failed";
  11.  
  12.    #print $query->header(), 
  13.       #$query->start_html($url),
  14.       print $query->redirect($url); 
  15.       #$query->p('Please kindly agree to the terms and condition below!'), 
  16.       #$query->p("You Agree? : $agree_field:"),
  17.       #$query->end_html;
  18.  
  19. }
  20. elsif ($agree_field != Annonymous)
  21. {
  22.      $query->start_html(-title=>'annonymous'), 
  23.       $query->p('Please kindly agree to the terms and condition below!'), 
  24.       $query->p("You Agree? : $agree_field:"),
  25.       $query->end_html;
  26. }
  27.  
  28.  
Nov 16 '08 #8

100+
P: 236
Hi Kevin / All,

How to I redirect and at the same time printed out that the comment in particular redirected html field that it is keyed in wrongly? Thanks in advance..

The html(item a) and perl code(item b) is below

Thanks in advance,

Best Rgds,
Andrew

a) html
=====

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//SoftQuad//DTD HTML 3.2 + extensions for HoTMetaL PRO 3.0(U) 19961211//EN"
  2.  "hmpro3.dtd">
  3. <HTML>
  4. <HEAD>
  5. <TITLE></TITLE></HEAD>
  6. <BODY>
  7. <FORM ACTION="/cgi-bin/acctman2-if2.pl" METHOD="POST">
  8. <CENTER>
  9. <TABLE BORDER="0" WIDTH="400">
  10. <TR>
  11. <TD ALIGN="CENTER">
  12. <TABLE BORDER="0" CELLPADDING="5" BGCOLOR="#FF8000">
  13. <TR>
  14. <TD><INPUT TYPE="CHECKBOX" NAME="agree" VALUE="agree"></TD>
  15. <TD><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>I agree to the Terms 
  16. and Conditions above.</B></FONT></TD></TR></TABLE><BR></TD></TR>
  17. <TR>
  18. <TD>
  19. <HR SIZE="2" NOSHADE="NOSHADE"></TD></TR>
  20. <TR>
  21. <TD ALIGN="CENTER">
  22. <TABLE BORDER="0" WIDTH="350" NOWRAP="NOWRAP">
  23. <TR>
  24. <TD><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>Customer Information</B></FONT><BR><FONT
  25. SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FF0000"><B>Fields marked 
  26. with an asterisk<BR>are required input fields.</B></FONT><BR><BR></TD></TR>
  27. <TR>
  28. <TD><INPUT TYPE="TEXT" NAME="fname">
  29. <FONT SIZE="-1" FACE="verdana, arial, helvetica">First Name *</FONT></TD></TR>
  30. <TR>
  31. <TD><INPUT TYPE="TEXT" NAME="lname">
  32. <FONT SIZE="-1" FACE="verdana, arial, helvetica">Last Name *</FONT></TD></TR>
  33. <TR>
  34. <TD><INPUT TYPE="TEXT" NAME="email">
  35. <FONT SIZE="-1" FACE="verdana, arial, helvetica">E-Mail Address *</FONT></TD></TR></TABLE>
  36. <TABLE BORDER="0" WIDTH="350" NOWRAP="NOWRAP">
  37. <TR>
  38. <TD><BR><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>Choose a User 
  39. Name</B></FONT><BR><INPUT TYPE="TEXT" NAME="username"> 
  40. <FONT SIZE="-1" FACE="verdana, arial, helvetica">User Name</FONT>  
  41. <FONT SIZE="-1" FACE="arial, helvetica"><BR><BR><B>Choose a Password</B></FONT><BR>
  42.  
  43. <INPUT TYPE="password" NAME="pwd">     
  44. <FONT SIZE="-1" FACE="verdana, arial, helvetica">Password</FONT><BR><INPUT
  45. TYPE="password" NAME="pwd2"> <FONT SIZE="-1" FACE="verdana, arial, helvetica">Verify
  46.   Password</FONT></TD></TR></TABLE><BR><BR><INPUT
  47. TYPE="SUBMIT" NAME="process" VALUE="Submit My Order"><INPUT
  48. TYPE="RESET" NAME=""></TD></TR>
  49. <TR>
  50. <TD>
  51. <HR SIZE="2" NOSHADE="NOSHADE"></TD></TR></TABLE></CENTER></FORM></BODY></HTML>
b) perl(see redirect below)
===================

Expand|Select|Wrap|Line Numbers
  1. #!c:\perl\bin\perl.exe 
  2. #!/usr/bin/perl 
  3. ############################################ 
  4. ##                                        ## 
  5. ##     Account Manager LITE User Signup   ## 
  6. ##          by SiteInteractive.com        ## 
  7. ##    http://siteinteractive.com/contact  ## 
  8. ##                                        ## 
  9. ##             version:  1.09             ## 
  10. ##       last modified:  07/24/2002       ## 
  11. ##        copyright (c) 1998 - 2002       ## 
  12. ##                                        ## 
  13. ##    latest version is available from    ## 
  14. ##        http://SiteInteractive.com      ## 
  15. ##                                        ## 
  16. ############################################ 
  17. # Copyright 1998 Elite Host.  All Rights Reserved. 
  18. # TERMS OF USE  
  19. # 1. Account Manager is for licensed customers 
  20. # only. Customer may use Account Manager as many 
  21. # times as customer wishes, as long as customer owns or runs the web 
  22. # site that Account Manager is installed on.  Account 
  23. # Manager may not under any circumstances be sold 
  24. # or redistributed without the written consent of CGI Script Center and 
  25. # its owner Diran Alemshah. 
  26. # 2. CGI Script Center, at its own discresion, will decide if any terms  
  27. # of the this agreement have been violated by customer. Upon written e- 
  28. # mailed notification to Customer of Terms of Use violations, CGI 
  29. # Script Center may revoke customer's license to use Account Manager. 
  30. # In that event, Customer agrees to any and all of the following: 
  31. # a) Customers found in violation of this agreement, found reselling or 
  32. # redistributing Account Manager, or making  
  33. # Customers Members Area ID and password public to anyone in any  
  34.  
  35. # manner will forfeit their Members area password and all rights to  
  36. # future versions of Account Manager. 
  37. #  
  38. # b). Customer will no longer be licensed to run any version of  
  39. # Account Manager.  
  40. # Indemnification 
  41. # 1. Customer agrees that it shall defend, indemnify, save and hold 
  42. # CGI Script Center, Elite Web Design and marketing, and any 
  43. # persons affiliated with either company, harmless from any and all 
  44. # demands, liabilities, losses, costs and claims, including reasonable 
  45. # attorney's fees asserted against CGI Script Center, its agents, its 
  46. # customers, officers and employees, that may arise or result from any 
  47. # service provided or performed or agreed to be performed or any product 
  48. # sold by customer, its agents, employees or assigns. Customer agrees to 
  49. # defend, indemnify and hold harmless CGI Script Center, its agents, 
  50. # its cusomters, officers, and employes,against 
  51. # liabilities arising out of; a) any injury to person or property caused 
  52. # by an products sold or  otherwise distributed in connection with CGI 
  53. # Script Center products; (b) any material supplied by customer 
  54. # infringing or allegedly infringing on the proprietary rights of a 
  55. # third party; c) copyright infringement and (d) any defective products 
  56. # sold to customer from CGI Script Center products. 
  57. # This program may not be distributed in whole or part, freely, for pay,  
  58. # or any other form of compensation. 
  59. ##################################################  ############### 
  60. # This version designed for Win32 systems (NT).  If you require 
  61. # a Unix version, please contact cgi@elitehost.com 
  62. ##################################################  ############### 
  63.  
  64.  
  65. ##################################################  ############ 
  66. # EDIT USER CONFIGURATIONS BELOW 
  67. ##################################################  ############ 
  68.  
  69. # apache is in d DRIVE!!! not C
  70.  
  71. #require "d:/program files/apache software foundation/apache2.2/cgi-bin/config.pl"; 
  72.  
  73. # This completes this portion of your Account Manager setup 
  74. ##################################################  ############ 
  75. # DO NOT EDIT BELOW THIS LINE 
  76. ##################################################  ############ 
  77.  
  78. use CGI; 
  79. use CGI::Carp qw(fatalsToBrowser); 
  80. use DBD::mysql;
  81. use DBI;
  82. use Email::Valid;
  83.  
  84. require LWP::UserAgent;
  85.  
  86.  
  87. my $query = CGI->new; 
  88.  
  89. unless ($CGI::VERSION >= 2.47) {  
  90.    error('Your version of CGI.pm is too old. You must have verison 2.47 or higher to use this script.') 
  91.  
  92.  
  93. #SECTION B
  94. #=========================================
  95. #Database initialization and initial query
  96. my ($dbh, $data_source);  
  97. my $mysql_server_name   = 'localhost';  
  98. my $mysql_database_name = 'test';  
  99. my $mysql_user_name     = 'root';  
  100. my $mysql_password      = 'mysql1';  
  101.  
  102. my $data_source = 'DBI:mysql:' . $mysql_database_name . ':' . $mysql_server_name;  
  103. my $dbh = DBI->connect( $data_source, $mysql_user_name, $mysql_password, {RaiseError=>1}) ||  die "$DBI::errstr";   
  104.  
  105.  
  106.  
  107.  
  108. #important line to pass email address from html to perl
  109. my $agree_field = $query->param("agree") || 'Annonymous'; 
  110. my $first_name = $query->param("fname") || 'Annonymous'; 
  111. my $last_name = $query->param("lname") || 'Annonymous'; 
  112. my $email_address = $query->param("email") || 'Annonymous'; 
  113. my $user_name = $query->param("username") || 'Annonymous'; 
  114. my $password = $query->param("pwd") || 'Annonymous'; 
  115.  
  116.  
  117. #Newly added 14th nov 08
  118. if ($agree_field == Annonymous)
  119. {
  120.      my $url = "http://localhost/amform.html";
  121.  
  122.  
  123.   #my $req = HTTP::Request->new($url);
  124.   #my $res = LWP::UserAgent->new->request($req);
  125.   #print $res->is_success ? $res->content : "failed";
  126.  
  127.    #print $query->header(), 
  128.       #$query->start_html($url),
  129.       print $query->redirect($url); 
  130.       #$query->p('Please kindly agree to the terms and condition below!'), 
  131.       #$query->p("You Agree? : $agree_field:"),
  132.       #$query->end_html;
  133.  
  134. }
  135. elsif ($agree_field != Annonymous)
  136. {
  137.      $query->start_html(-title=>'annonymous'), 
  138.       $query->p('Please kindly agree to the terms and condition below!'), 
  139.       $query->p("You Agree? : $agree_field:"),
  140.       $query->end_html;
  141. }
  142.  
  143.  
  144.  
  145.  
  146. # End of Database initial Query
  147. #==========================================
  148.  
  149. print $query->header(), 
  150.       $query->start_html(-title=>'Input Successful'), 
  151.       $query->p('Thanks for registrating your particulars with us!'), 
  152.       $query->p("You Agree? : $agree_field:"),
  153.       $query->p("Your First Name : $first_name"),
  154.       $query->p("Your last Name : $last_name"), 
  155.       $query->p("Your email address: $email_address"), 
  156.       $query->p("Your username : $user_name"), 
  157.       $query->p("Your Password : $password"), 
  158.       $query->end_html; 
  159.  
  160. sub error { 
  161.    print $query->header(), 
  162.          $query->start_html(-title=>'Error'), 
  163.          shift, 
  164.          $query->end_html; 
  165.    exit(0); 
  166.  
  167.  
  168.  
  169. my $sql = $dbh->prepare(qq{SELECT * FROM user_reg}); 
  170.    $sql->execute(); 
  171.  
  172. while (my @data = $sql->fetchrow_array()) { 
  173.  
  174.       # Print the date from the first two columns in the table 
  175.       #print $data[0], "\t", $data[1], "<br>"; 
  176.        print $data[0], "\t", $data[1], "\t", $data[2], "\t", $data[3], "\t", $data[4], "\t", $data[5], "<br>";  
  177.  
  178. 1;
  179.  
  180.  
  181.  $sql = $dbh->prepare(qq{insert into user_reg(agree_field, first_name, last_name, email_address, user_name, password) values ( "$agree_field", "$first_name", "$last_name", "$email_address", "$user_name", "$password") } );  
  182.    $sql->execute() or die "$dbh->errstr\n";;  
  183.  
  184. $sql = $dbh->prepare(qq{SELECT * FROM user_reg});  
  185.  $sql->execute(); 
  186.  
  187.  
  188. while (my @data = $sql->fetchrow_array()){  
  189.  
  190.       # Print the date from the first four columns in the table  
  191.       print $data[0], "\t", $data[1], "\t", $data[2], "\t", $data[3], "\t", $data[4], "\t", $data[5], "<br>";  
  192.  
  193. }
  194. 1;
  195.  
  196. #Let's see if the email_address conforms to the RFC822 specification
  197. print (Email::Valid->address($email_address) ? 'yes' : 'no');
  198.  
  199.  
Nov 16 '08 #9

100+
P: 236
Hi All,

Can I modified the redirect to pass parameter to print besides the registration html form?

It is line 127 to 136 above(see below for the partial cut and paste code)

Kindly advise.


Cheers...
Andrew

Expand|Select|Wrap|Line Numbers
  1.  
  2.      my $url = "http://localhost/amform.html"; 
  3.  
  4.  
  5.      print $query->redirect($url);  
  6.  
  7.  
Nov 16 '08 #10

100+
P: 236
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

Hi Guys,

a) I got the above and could not post... Kindly assist...

b) can anyone recommend me good websites to create blogs with perl?

c) can anyone recommend me good website to create search engine with perl?

d) heard joomla does not support perl, only php, any advise on this as I wanted to use it to create a website of blog and search engine and create web graphics and present the website visually and asthetically beautiful and neat...
As understand that Joomla is extremely powerful in terms of webpage creation? Any equivalent for perl webpage creation if Joomla does not support perl but php?


Thanks in advance...
Andrew
Dec 28 '08 #11

numberwhun
Expert Mod 2.5K+
P: 3,503
Not sure about your permissions issue. Where are you seeing it? Which forum?

As for Joomla, it is a CMS (Content Management System). You actually create the template and then fill the content. The equivelant Perl based CMS is called Catalyst. While I have the book for it, I haven't yet played with it. I have heard though that Catalyst is not really all that user friendly and takes a bit of dedication if you really want to use it. Personally, I am playing with Drupal at the moment instead of either of the above (PHP based).

Regards,

Jeff
Dec 28 '08 #12

100+
P: 236
Hi thanks...

I saw drupal, seemed comprehensive, is it good for blog and search engine?


Thanks and Best Rgds,
Andrew
Dec 29 '08 #13

numberwhun
Expert Mod 2.5K+
P: 3,503
@happyse27
Again, they are content management systems. It is still up to you to produce the code that you are speaking of for behind the scenes work.
Dec 29 '08 #14

100+
P: 236
hi Sir,

Thanks. I search in drupal for the blog module, but could not find it... any clue?


Best Rgds,
Andrew
Dec 29 '08 #15

numberwhun
Expert Mod 2.5K+
P: 3,503
@happyse27
Did you happen to go to the drupal modules page and search for "blog"?

I hope that you are not under the misconception that if you install drupal and the blog module (which is probably a theme), that you will magically have a blog that works. You have to have some software behind the scenes that is specifically for blogging. (ie: wordpress).

I still get the feeling that you think drupal is some magical software that has modules to do it all for you. There are modules for many things, but drupal itself is again, a CMS. You might need to look up the definition of a CMS. I don't want there to be any confusion on your part.

Regards,

Jeff

(of course, if you find out that I am mistaken on the capabilities of Drupal, do let me know). :-)
Dec 29 '08 #16

100+
P: 236
ok thanks... appreciated Sir...

for the download blog it is in unix format, any thing in windows format?

Thanks...
Andrew
Dec 30 '08 #17

numberwhun
Expert Mod 2.5K+
P: 3,503
@happyse27
If by "unix format" you mean that the files are .tar.gz, that is just an archive and compression scheme that even winzip can undo. If you look at the drupal documentation for System Requirements, you will see that both Apache and IIS are supported. Since you don't run IIS on Unix, I would truly assume that Windows is supported, you just have to unzip and unpack the tarballs with winzip (or the like) and then use the files inside as prescribed by the documentation.

Regards,

Jeff
Dec 30 '08 #18

100+
P: 236
Thanks Sir... Btw, does most of the hosting supports perl on windows? Including the blog and forum?
Jan 2 '09 #19

100+
P: 236
Hi All,

Thanks in advance....

I got this again(cant post)... for my user account, please kindly assist.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Posting Rules 
  3. You may not post new threads
  4. You may not post replies
  5. You may not post attachments
  6. You may edit your posts
  7. [COLOR=#105cb6]BB code[/COLOR] is On
  8. [COLOR=#105cb6]Smilies[/COLOR] are On
  9. [COLOR=#105cb6][img][/COLOR] code is On
  10. HTML code is Off



Thanks,
Andrew
Jan 9 '09 #20

numberwhun
Expert Mod 2.5K+
P: 3,503
happyse27(Andrew),

You need to PLEASE read your private messages as soon as possible!!

Regards,

Jeff
Jan 19 '09 #21

Post your reply

Sign in to post your reply or Sign up for a free account.