473,473 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

URL Redirection in CGI

6 New Member
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 7459
GunnarH
83 New Member
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 New Member
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 New Member
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 New Member
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 New Member
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 New Member
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
lordspace
10 New Member
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

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

Similar topics

2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
52
by: Gerard M Foley | last post by:
Can one write a webpage which is not displayed but which simply redirects the user to another page without any action by the user? Sorry if this is simple, but I am sometimes simple myself. ...
15
by: Taki Jeden | last post by:
Hello everybody Does anybody know why w3c validator can not get pages that use 404 htaccess redirection? I set up two web sites so that clients request non-existent urls, but htaccess redirects...
2
by: Nadav | last post by:
Hi, Introduction: *************** I am trying to redirect stdout to a RichEdit control, this is done by initiating a StringWriter, associated it with a StringBuilder and setting the...
0
by: Dimitrios Mpougas | last post by:
Hello, I have two asp.net pages. The first is a page (main.aspx) wich has four links on it. The href value of each link is: href="view.aspx?id=1" traget="_blank" href="view.aspx?id=2"...
8
by: Luciano A. Ferrer | last post by:
Hi! I was following the http://www.seomoz.org/articles/301-redirects.php article, trying to do that with one of my test sites I added this to the .htaccess file: RewriteEngine On RewriteCond...
13
by: souissipro | last post by:
Hi, I have written a C program that does some of the functionalities mentionned in my previous topic posted some days ago. This shell should: 1- execute input commands from standard input,...
1
by: comp.lang.php | last post by:
require_once("/users/ppowell/web/php_global_vars.php"); if ($_GET) { // INITIALIZE VARS $fileID = @fopen("$userPath/xml/redirect.xml", 'r'); $stuff = @fread($fileID,...
4
by: psual | last post by:
hi newbie in web design I got some issue concerning a secure redirection between 2 pages let say I have a page with a grid (the 'master' page) in this grid I can select a record, get its pk...
13
by: Massimo Fabbri | last post by:
Maybe it's a little OT, but I'll give it try anyway.... I was asked to maintain and further develop an already existing small company's web site. I know the golden rule of "eternal" URIs, but...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.