Switch layouts home | FAQ | | P1 | P2 | P3 | P4 | P5 |  | A1 | A2 | A3  | | B1

getfromURL

1. Create a copy or a link to PB. It may be either a hard link or a symbolic link depending on your preferences and settings of the web server. The name of the link can be anything as long as the web server is going to run it as a cgi script. For example, p5.cgi
ln ../cgi-bin/pb.pl ./p5.cgi    or
ln -sf ../cgi-bin/pb.pl ./p5.cgi

2. Create a project configuration file. The name should be cgi-script's name + ".pm". For p5.cgi this file should be ./p5.cgi.pm
use vars qw($dbh $sth);
$templatesdir="sampledir";
$Parameter{Page}="home"; 
$Template{home}="$templatesdir/p5-home.html";
1;

3. Create an html-template file, p5-home.html
Let's see what Yahoo! has to offer today:
<hr>
<!%getfromURL "http://m.www.yahoo.com/"%> 


4. This web project is complete. Check it out:
/PB/p5.cgi


2002-03