Sponsored Content
Full Discussion: Auto redirection in Perl
Top Forums Web Development Auto redirection in Perl Post 302374642 by otheus on Wednesday 25th of November 2009 06:12:53 AM
Old 11-25-2009
This really isn't a perl question -- it's a web-programming question. There's nothing specific to Perl. You can do

Code:
sleep 5;
print redirect("Location: $newurl\n");

See CGI - perldoc.perl.org for more info.
 

9 More Discussions You Might Find Interesting

1. Programming

Help with redirection

Here is my problem. I don't know make this redirection thing work. The output file (called output.c) looks like this #include<stdio.h> int main() { int k; int m; print f("%d\n", k); printf("%d\n", m); return 0; } the input file(called input.c) is this #include<stdio.h> int... (2 Replies)
Discussion started by: Shallon1
2 Replies

2. Shell Programming and Scripting

Perl Redirection

Hi, I have a Perl script that finds some files based on some criteria and then it processes the file contents using some logic. Extract: print "Started ... "; my $command = "<unix command>"; @arr=`$command`; $size=@arr; print "Size: ".$size If I turn on the Perl debugging option then I... (3 Replies)
Discussion started by: King Nothing
3 Replies

3. UNIX for Dummies Questions & Answers

Help with Redirection

Hi Guys, I m new to UNIX and new to this forum. Was wondering if someone can help me understand redirection (standard input output pipeline etc) for starters, not too sure what this would mean who | sort > sortedfile | pr | lp im starting to understand common commands but when throwing... (2 Replies)
Discussion started by: jmack123
2 Replies

4. Shell Programming and Scripting

I/O redirection

Hello everyone,I'm reading a book and there's code fragment: exec 3>&1 ls -l 2>&1 >&3 3>&- | grep bad 3>&- exec 3>&- It says that the red part of that code does not close fd 3 but the green does close the fd 3.I can't understand that.....Why?Any predicate will be appreciated.:) (18 Replies)
Discussion started by: homeboy
18 Replies

5. Shell Programming and Scripting

Redirection

Hello All, I am using the below script to gather various tools running by the user, we have more than 100 tools running on the server so my challenge is to redirect memory & cpu load to the file with the name of the tool.so am using the below script i am stucking how to redirect to the file... (2 Replies)
Discussion started by: ajaincv
2 Replies

6. UNIX for Dummies Questions & Answers

about different redirection

explain the redirections 1>, 2>, 3>, ..... and 1< ,2<,3<..... where we use these things thanks Thread moved from AIX forum (2 Replies)
Discussion started by: tsurendra
2 Replies

7. Shell Programming and Scripting

[Perl] Redirection

At the moment I have the following code which visits the site then saves the page: $req = HTTP::Request->new(POST => $url . '/search.php'); $data = $ua->request($req)->decoded_content; open(HTMLfile, '>hello.html'); print HTMLfile $data; close(HTMLfile); From the page it saves theres a URL,... (6 Replies)
Discussion started by: AndrewTwain
6 Replies

8. Shell Programming and Scripting

Python/Perl script for auto login

I am loooking for a python/perl script which can login to gmail or any mail accounts and open a browser with the logged in page. I am trying this in a windows environment. I tried many docs available over internet an nothing seems to be working. (4 Replies)
Discussion started by: Tuxidow
4 Replies

9. UNIX for Beginners Questions & Answers

Howto auto boot SPARC | How to auto supply "start /SYS" and "start /SP/console" commands

When I power ON my T4-1, I got a prompt -> where I have to start /SYS and start /SP/console. How can I auto supply these two commands ? (3 Replies)
Discussion started by: z_haseeb
3 Replies
Auth::Yubikey_WebClient(3pm)				User Contributed Perl Documentation			      Auth::Yubikey_WebClient(3pm)

NAME
Auth::Yubikey_WebClient - Authenticating the Yubikey against the Yubico Web API VERSION
Version 3.00 SYNOPSIS
Authenticate against the Yubico server via the Web API in Perl Sample CGI script :- #!/usr/bin/perl use CGI; $cgi = new CGI; $otp = $cgi->param("otp"); print "Content-type: text/html "; print "<html> "; print "<form method=get>Yubikey : <input type=text name=otp size=40 type=password></form> "; use Auth::Yubikey_WebClient; $id = "<enter your id here>"; $api = "<enter your API key here>"; $nonce = "<enter your nonce here>"; if($otp) { $result = Auth::Yubikey_WebClient::yubikey_webclient($otp,$id,$api,$nonce); # result can be either ERR or OK print "Authentication result : <b>$result</b><br>"; } print "</html> "; FUNCTIONS
new Creates a new Yubikey Webclient connection use Auth::Yubikey_WebClient; my $yubi = Auth::Yubikey_WebClient->new({ id => <enter your id here> , api => '<enter your API key here>' , nonce => '<enter your nonce if you have one>' }); You can overwrite the URL called if you want to call an alternate authentication server as well :- use Auth::Yubikey_WebClient; my $yubi = Auth::Yubikey_WebClient->new({ id => <enter your id here> , api => '<enter your API key here>' , nonce => '<enter your nonce if you have one>', url => 'http://www.otherserver.com/webapi.php' }); debug Displays the debug info $yubi->debug(); Prints out some debug information. Useful to be called after authentication to see what Yubico sent back. You can also call the variables yourself, for example if you'd like to see what the token ID is, call $yubi->{publicid}. The same goes for all the other variables printed in debug. yubikey_webclient otp Check a OTP for validity $result = $yubi->otp($otp); Call the otp procedure with the input from the yubikey. It will return the result. This function will also setup a few internal variables that was returned from Yubico. USAGE
Before you can use this module, you need to register for an API key at Yubico. This is as simple as logging onto <https://upgrade.yubico.com/getapikey/> and entering your Yubikey's OTP and your email address. Once you have the API and ID, you need to provide those details to the module to work. AUTHOR
Phil Massyn, "<phil at massyn.net>" BUGS
Please report any bugs or feature requests to "bug-auth-yubikey_webclient at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Auth-Yubikey_WebClient <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Auth- Yubikey_WebClient>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Auth::Yubikey_WebClient You can also look for information at: o RT: CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=Auth-Yubikey_WebClient <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Auth-Yubikey_WebClient> o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/Auth-Yubikey_WebClient <http://annocpan.org/dist/Auth-Yubikey_WebClient> o CPAN Ratings http://cpanratings.perl.org/d/Auth-Yubikey_WebClient <http://cpanratings.perl.org/d/Auth-Yubikey_WebClient> o Search CPAN http://search.cpan.org/dist/Auth-Yubikey_WebClient <http://search.cpan.org/dist/Auth-Yubikey_WebClient> Version history 0.04 - Fixed bug <http://rt.cpan.org/Public/Bug/Display.html?id=51121> 1.00 - Added validation of the request to Yubico (Thanks to Kirill Miazine) 2.00 - Added nounce coding (Thanks to Ludvig af Klinteberg) 2.01 - Response turning into an array due to bug (Thanks to Peter Norin) ACKNOWLEDGEMENTS
COPYRIGHT &; LICENSE Copyright 2010 Phil Massyn, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-01-14 Auth::Yubikey_WebClient(3pm)
All times are GMT -4. The time now is 04:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy