473,372 Members | 1,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

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 7452
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

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.