Solved

Perl and OPACs

Posted on 2002-04-09
8
162 Views
Last Modified: 2010-03-05
hello to everybody

the question is (maybe) not difficult but it may employ long time to resolve.

please go to

http://opac.bib.uniud.it:82/ALEPH/

this is the on line catalogue of a university (sorry for the italian language) made with ALEPH. You can find other info and english demos about this software at:

http://www.exlibris-usa.com/aleph/products7.html

all that I want is a dynamic perl page that passes to the catalogue some string search (IE a perl page that automatically finds all the books that have the word "mathematics" on the title) and returns a list of the matching headers

in other words something like "click here to find all the mathematics books of the university" with "here" hyperlinked to the perl page in question.

I think that the difficult is on the large use of dynamic session-ids inside this software.
bye and thanks

Fabiano
0
Comment
Question by:fabianope
8 Comments
 
LVL 6

Expert Comment

by:christopher sagayam
ID: 6927750
listening to other's answers....
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6928457
could you please post the code which needs to be changed
0
 

Author Comment

by:fabianope
ID: 6930589
hello,
I know that this is an ORACLE solution, but I've not an administrative access to the server and I don't know the
database structure, so I must work only with the (dynamic) HTML interface.
I've thought to the following scenario:

1) with a first interrogation to the html interface the script fetch the session ID(s)

2) with a "second passage" the script builds the right url for the search.

please note that you can "fix" the search to a pre-defined search term: I.E.

<a href="searchmat.pl">math books</a>

where searchmat.pl is the page I desired...

the script should be build from scratch: if this is difficult I can increase the points.

bye

Fabianope
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 1

Expert Comment

by:sushrut
ID: 6930752

fabianope,
If you want to know how to use patterns,
http://www.perldoc.com/perl5.6.1/pod/perl.html
You will get links to perlre and perlre tutorial.

I could not open the english site :( and I dont understand
 italian :(

Well, where is the data lying? Is it in oracle or it is coming from HTML form?

If the data is lying in Orcale, then I think you need to know database structure.

Do you know how to connect to oracle using perl?

Also to read database and knowing a database structure does not need administrator access.



0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 330 total points
ID: 6932129
#! /usr/bin/perl
use CGI;
use HTTP::Request;
use LWP::UserAgent;
$::query = new CGI;
$::query->import_names('Q');
$url = "http://your-URL-here";
$usr = LWP::UserAgent->new();
$req = HTTP::Request->new(GET=>"$url");
$txt = $usr->request($req);
undef $/;
$x = $_= $txt->content();
$sessionid =~s/(regular-expression-to fetch-sessionid)/$1/;
# no you need to put $sessionid to $url like
$url .= "?sessionid=$sessionid";
$req = HTTP::Request->new(GET=>"$url");
print $usr->request($req);
exit 0;
#
# very basic script, to be improved in many ways
0
 

Author Comment

by:fabianope
ID: 6947582
ahoffmann
thanks a lot for the solution.
sorry for the delay in answering (I was away for work)
in the next hours I'll try it and if successfull I'll accept it.

bye

fabianope
0
 

Author Comment

by:fabianope
ID: 6985781
hello,
excuse the delay in answering (I've added 30 points)

thanks
Fabianope
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6986855
Thanks
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Connecting to linux server using Net::Telnet module 25 232
pattern matching in perl 2 103
git fat pull happens nothing in centos 6.3 python 2.6.6 33 216
Regular Expression for URL 10 97
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

770 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