perl mysql (3) perl CGI (3)
Exchange Links About this site Links to us

|
General :: Web publishing :: perl CGI
CGI = Common Gateway Interface, a specification for transferring information between a web server and a CGI program. Here you find code snippets for CGIs written in perl.
Articles:
This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Featured Article
Perl script on web server sends Excel file to browserQuestion: I need to have my web site generate an Excel worksheet on the fly (a database export) and send it to the user's webbrowser. How can I do that?
Answer: The following assumes that you export a simple sheet containing strings and numbers, no formulas.
In this case, you can generate a CSV file (comma separated values) and set the mime type to applicatioon/octet-stream.
If you perl script is called as /cgi-bin/exportcsv.pl then the downloaded file will by default be named
exportcsv.pl.xls (using alternative mime type application/vnd.ms-excel)
To suggest a specific file name (other than the script name, use the Content-Disposition header field. This field allows you to provide other information as well, e.g.
- creation-date
- modification-date
- read-date
- size
Note:
The size parameter indicates just an approximate size of the file in octets. It does not have to be the exact size. This information can be used by the client software (web browser) to pre-allocate space before attempting to store the file, or to determine whether enough space exists.
For the full syntax, see RFC 2183
 | |  | | print "Content-type: application/vnd.ms-excel\n";
print "Content-Disposition: attachment;filename=users.csv\n\n";
print "Content-type: application/octet-stream\n";
print "Content-Disposition: attachment;filename=users.csv\n\n";
print '"1","Test, first one"' . "\n";
print '"2","Test, last one"' . "\n";
| |  | |  |
| Generated 8:02:17 on Apr 20, 2018 | Most recent comments
2018-04-20 05:15:29:
by martinsmithword@gmail.com
in Delphi
on The meaning of Runtime Error 217:
Hello Dear,
We issue All types of bank instruments such as BG/SBLC, BANK DRAFT, BCL, MT103 cash backed, MT103/202 cash wire, Bank Letter/Confirmation , MT799 block funds etc.
Issuing ... read more
|
2018-04-20 05:10:09:
by anonymous
in Dating Scams
on Dating scammer Rhoda Naa from Accra, Ghana:
After a while you can almost pick out what porn stars look like
|
2018-04-19 07:50:13:
by SAMUEL
in Finances
on Well-respected bank offering Payday loans:
I sincerely didn’t like the idea, but this is my way of saying thank you to the Quora user that recommended a hacker (ETHICALHACKERS009@GMAIL.COM)
I hired him for a very private and diffic ... read more
|
2018-04-19 04:49:07:
by anonymous
in Male Dating Scammers
on Dating scammer Mike Bruce:
Hello,
I got my loan from Mr Larry Frank if you are interested, contact him @ frankworld.4563@gmail.com You can still call him with this Number +1 925 421 6015.
Loan Amount needed:
... read more
|
2018-04-18 15:45:29:
by anonymous
in Dating Scams
on Gold digger Valeria Novitskaya from Ukraine:
anonymous
Dear Rick, Hagar or whatever you are. Thank you for all this lies you wrote here. My lawyer soon will contact you. Do you think you are so clever? Wrote all this lies about me and ... read more
|
2018-04-18 10:03:46:
by Keat Cheng
in Web publishing
on Getting started with CSS:
We are Ireland based major/Direct providers of Fresh Cut BG, SBLC, POF, MTN, Bonds and CDs and this financial instruments are specifically for lease and sale.We are one of the leading Financial instr ... read more
|
2018-04-18 07:09:27:
by anonymous
in Dating Scams
on Dating scammer Sonja Hittnes Fraser:
Nicole Heinlein with friend
|
|
2018-04-18 04:22:09:
by [hidden]
in Dating Scams
on Various dating scammers:
Venny Andrew/Gadder
Claims she's from US stuck in Ukraine. Found me on Facebook. Her profiles are full of Nigerian people and posts.wants me to send money to 1026 sherbakova luhansk Ukraine. The ... read more
|
2018-04-18 01:40:19:
by [hidden]
in Dating Scams
on Dating scammer Irina:
Agency maestro 'Boris' awaits your money transfer! Lazy bunch of scammers continue using old pixs going back as far as 2010. All the above pixs posted sometime ago on this webside under different name ... read more
|
2018-04-18 00:24:45:
by Nikhil
in Passwords
on Need password for encrypted RAR or ZIP archive:
i need a password of RAR File of Prince of Persia The forgotten Sand. PleaHelp
Nikhilkasat12@gmagmail.com
|
|