469,343 Members | 5,350 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,343 developers. It's quick & easy.

URL Redirection in CGI

6
Hi
How to redirect to a url of a site's particular page.I had tried like this in my prog. Is it correct?

Redirection url:
http://www.gmail.com/login.cgi?LOGIN=abc&PASSWORD=123&domain=google.com &page=inbox

The problem that I am facing is that it takes gmail site but not using the parameters in the url(LOGIN=abc&PASSWORD=123&domain=google.com&page= inbox).

Any help will be greatly appreciable!!!!!!!!!!!
Nov 28 '06 #1
7 7012
GunnarH
83
I don't think you have a redirection problem.

There are Perl modules that might be useful to you: http://search.cpan.org/search?query=gmail
Nov 28 '06 #2
kavin
6
Hi
It is not a specific to gmail ,I would like to do it for general.........I have used LWP::Simple module and its get() method..........can you provide me a better solution for this issue.................
Nov 29 '06 #3
GunnarH
83
I haven't understood what "this issue" is. Make a better effort to explain what it is you want to accomplish. Also, post a short but complete script, that we can copy and run, and that demonstrates the problem you are having.
Nov 29 '06 #4
geek491
21
Hi
How to redirect to a url of a site's particular page.I had tried like this in my prog. Is it correct?

Redirection url:
http://www.gmail.com/login.cgi?LOGIN...com&page=inbox

The problem that I am facing is that it takes gmail site but not using the parameters in the url(LOGIN=abc&PASSWORD=123&domain=google.com&page= inbox).

Any help will be greatly appreciable!!!!!!!!!!!

Hi


url redirection is very easy

suppose u have a cgi program called home.pl which displays home page...but now u want the users to goto yahoo home page everytime they try to access the home.pl page.. to do this u need to change the code of home.pl to this


Expand|Select|Wrap|Line Numbers
  1. #!c:\perl\bin\perl
  2.  
  3. use CGI;
  4. my $co = new CGI();
  5.  
  6. $co->redirect('http://www.yahoo.com');
  7.  
####################################

this will do the job for u.
geek491
Dec 6 '06 #5
kavin
6
Hi
Thanks for your suggestion............

But if I need my cgi script to redirect to the inbox page of my Yahoo mail(providing username and password in redirecting url), then what will be the solution??
Dec 7 '06 #6
geek491
21
Hi
Thanks for your suggestion............

But if I need my cgi script to redirect to the inbox page of my Yahoo mail(providing username and password in redirecting url), then what will be the solution??
unfortuanately yahoo encrypts the parameters before it sends it...so u cant use simple redirection like

http://yahoomail.co.in/user=abc,password=abc

it wont work... a session id which is created is unique and cant be replicated using url.
Dec 20 '06 #7
hi,

browser uses HTTPS when sending user and password to google site and receives some auth cookies.

about the redirection, here is my suggestion:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. print "Location: http://domain.com\n\n";
  3.  
Svet
Dec 27 '06 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Albert Ahtenberg | last post: by
52 posts views Thread by Gerard M Foley | last post: by
15 posts views Thread by Taki Jeden | last post: by
2 posts views Thread by Nadav | last post: by
reply views Thread by Dimitrios Mpougas | last post: by
8 posts views Thread by Luciano A. Ferrer | last post: by
13 posts views Thread by souissipro | last post: by
1 post views Thread by comp.lang.php | last post: by
4 posts views Thread by psual | last post: by
13 posts views Thread by Massimo Fabbri | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.