RE: downloady filenames

2001-06-12 Thread Jon Galliers

This seemed to work.

print Content-type:application/whatever\n.Content-Disposition: 
attachment; filename=$file\n\n


Thanks
Jon

*
  Jon Galliers   [EMAIL PROTECTED]
  Programmer Perl/C++/MySQL/DB2/Java
  Design Net http://www.design.net.uk
Tel: +44(0)870 240 0088
Fax: +44(0)870 240 0099
*




Re: LCN June

2001-06-06 Thread Jon Galliers

did anyone on the list work at razorfish uk?




(possible) zip and file download problem

2001-04-23 Thread Jon Galliers

I asked a question a couple of weeks ago about using Archive::Zip, and 
although my script does work, I still have a few queries about it; I wonder 
if anyone can shed any light.

The basic idea is that there are files of multiple formats (.doc, .pdf, 
.etc) that need to be downloaded through a users browser. It also needs to 
be downloaded through the program logic, and not as a simple link.

The main problem is that the zipped file downloads as NameOfCGIFile.zip 
and not download.zip. I am also slightly more concerned about my 
(possibly pitiful) attempts at file locking, and the consequences of many 
users trying to download files at the same time. I've been playing around 
with this for some time, but I can't find a better way to do this.




($file - name from database query)

my $zip = Archive::Zip-new() or die couldn't create zip $!;
$zip-addFile(/web/www.website.com/docs/$file) or die couldn't add file $!;
$zip-writeToFileNamed('/web/www.website.com/docs/download.zip');# possible 
lock error;
open (DOCZIP, /web/www.website.com/docs/download.zip) or die couldn't 
open file $!;

flock (DOCZIP, 2);

print Content-type:application/x-zip-compressed\n\n;

my $fileData;
while (read(DOCZIP, $fileData, 1024)) {
 print $fileData;
}

unlink (/web/www.website.com/docs/download.zip) or die couldn't delete 
file $!;

close(DOCZIP);





tia
Jon

*
  Jon Galliers   [EMAIL PROTECTED]
  Programmer Perl/C++/MySQL/DB2/Java
  Design Net http://www.design.net.uk
 Tel: +44(0)870 240 0088
 Fax: +44(0)870 240 0099
*




Re: Server Upgrade

2001-04-20 Thread Jon Galliers

I have a spare pc100 DIMM, 128Mb, CAS2. Could you use this.




Thanks
Jon

*
  Jon Galliers   [EMAIL PROTECTED]
  Programmer Perl/C++/MySQL/DB2/Java
  Design Net http://www.design.net.uk
 Tel: +44(0)870 240 0088
 Fax: +44(0)870 240 0099
*




Re: The Natives are Revolting

2001-04-19 Thread Jon Galliers

I know you're all probably bored with this, but I was even more bored and 
checked out the site further

 (Although "Chris"'s website http://storedscripts.virtualave.net/ is quite,
 um, entertaining ...)

It seems Burak Kanber (bk?) is Chris's best friend.

Not bad for a 13 year old though, ('legal' disclaimers excepted). They both 
should really get out more (and I should get on with some work).


Jon




Re: Archive::Zip

2001-03-28 Thread Jon Galliers

cheers, sorted



Try something like:

   use strict;
   use Archive::Zip qw( :ERROR_CODES :CONSTANTS );

   my $zip = Archive::Zip-new();
   my $member = $zip-addFile("boris.pl");
   $member-desiredCompressionLevel(9);
   $zip-writeToFileNamed("boris.zip") == AZ_OK or die "Zip write error";



Greg

Thanks
Jon

*********
  Jon Galliers   [EMAIL PROTECTED]
  Programmer Perl/C++/MySQL/DB2/Java
  Design Net http://www.design.net.uk
 Tel: +44(0)870 240 0088
 Fax: +44(0)870 240 0099
*




?party animals

2001-01-18 Thread Jon Galliers

As I've never met you all in person (hopefully to be rectified on February
1st, can't come tonight as we're boarding the loft..don't ask) I don't know
how big a party animal you all are, however some of you may be interested
that Linkdup/Uploaded are having a party on February 1st at the Strongrooms
Bar EC1 that goes on till 2am; details from their website at
http://weare.preloaded.com .


*
 Jon Galliers   [EMAIL PROTECTED]
 Programmer Perl/C++/MySQL/DB2/Java
 Design Net http://www.design.net.uk
 Tel: +44(0)870 240 0088
 Fax: +44(0)870 240 0099
*




RE: Teaching Java and Perl

2001-01-08 Thread Jon Galliers

I've been reading this discussion with interest[1], as we are in just that
process of deciding how best to develop 'web solutions' fast enough for
clients, bless their sweet hearts, and whether Java or Perl is the best
'tool' for the job. My personal feelings echo sentiments expressed earlier
in that Perl tends not to be taught, it's learnt by people who need it to
provide a solution to a particular solution, whereas Java is formally taught
and is then used to provide solutions whether or not it is the right tool or
not.

I'm still fairly new to Perl, and even newer to Java so I'm probably not the
best judge, but you have on one hand a proprietary language intensively
promoted by a large IT corporation, and on the other a 'free' language
promoted by the people who use it and find it infinitely useful. In this
arena Perl is always going to appear a non-commercial, or non-enterprise
solution where we have a whole IT infrastructure purchased by middle
management who have a sketchy understanding of programming technology and
who, on the whole, have been formally taught.

However, does this mean that Perl has to become a 'commercial' application
to compete? When you consider the spread and use of Perl has without formal
commercial support I don't think so.


Jon Galliers
Design Net


[1]and thinking I should contribute something to this list, even if it is an
incoherent ramble, and vowing that I'll make more effort to get to the next
meeting.