homepage Welcome to WebmasterWorld Guest from 54.145.243.51
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
What is a CGI script?!
cgi script, redirecting
galench

5+ Year Member



 
Msg#: 3551541 posted 10:29 am on Jan 18, 2008 (gmt 0)

Hello!

I am noob in coding... Therefore I will be very grateful, if somebody helps to find out the name of a script which I search! I need to learn what script it is used in this link:
[example93479283749.com...]
This link redirect on last site (example00000000000.net). Here all domains are replaced on "example (with digits)".

Thankful in advance to all!

 

coopster

WebmasterWorld Administrator coopster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3551541 posted 8:32 pm on Jan 18, 2008 (gmt 0)

Welcome to WebmasterWorld, galench.

The script being run is "main.cgi"

http://www.example93479283749.com/cgi-bin/frame/main.cgi?source@www.example93479283749.com/home/header.html:target@www.example00000000000.net

perl_diver

5+ Year Member



 
Msg#: 3551541 posted 1:15 am on Jan 19, 2008 (gmt 0)

I think he's hoping someone knows what script that is and will tell him where to get it. Maybe not.

galench

5+ Year Member



 
Msg#: 3551541 posted 9:23 am on Jan 19, 2008 (gmt 0)

So, how I have understood, not probably almost to define this script?!
Then there can be someone will prompt, what are CGI scripts of such type which are intended for redirecting or for some links databases redirect management!?
Sorry if some questions are stupid!

phranque

WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 3551541 posted 11:24 am on Jan 19, 2008 (gmt 0)

stupid? no
noob? maybe
difficult to understand? certainly

are you asking how to write a redirect script?
the simplest redirect script would look like this:
print "302 Moved\nLocation: http://example.com\n\n";

replace example.com with the url from the input parameters.
the first line printed is the http status code for a temporary redirect and the second line is a http location header.
the final two newlines are important.

galench

5+ Year Member



 
Msg#: 3551541 posted 4:55 pm on Jan 19, 2008 (gmt 0)

First, i think this script must be installed in host server! Isn`t it?
Also, somebody can advise some good redirect scripts?!
Thanks!

adwatson

5+ Year Member



 
Msg#: 3551541 posted 4:10 pm on Jan 21, 2008 (gmt 0)

Any cgi script certainly has to be installed on the host server. I imagine you can do it via javascript if you don't want be client-side. I don't know of any redirect scripts, but I'm sure there's tons of them out there - just google!

galench

5+ Year Member



 
Msg#: 3551541 posted 5:06 pm on Jan 21, 2008 (gmt 0)

Thanks AdWatson!

This script - main.cgi in this link [example93479283749.com...]
is not only for redirection!
He also change HTTP_REFERER to example93479283749.com - i mean to based site and not referer site (for example from google)!

Well, it`s good to find some script like this, but i even can`t understand what keywords googling! :(

galench

5+ Year Member



 
Msg#: 3551541 posted 5:07 pm on Jan 21, 2008 (gmt 0)

Also, if you try copy link url from my first message in this post you will se some redirect script from searchengineworld.com:
[searchengineworld.com...]

jatar_k

WebmasterWorld Administrator jatar_k us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3551541 posted 6:06 pm on Jan 21, 2008 (gmt 0)

it's called a 'redirect script' and it is for tracking redirects

the referer is changed because once you go to the redirect script it is the referring page, not the original page where you clicked

galench

5+ Year Member



 
Msg#: 3551541 posted 8:12 pm on Jan 21, 2008 (gmt 0)

OK! Wher to get this script or how it`s called usually!?

jatar_k

WebmasterWorld Administrator jatar_k us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3551541 posted 10:10 pm on Jan 21, 2008 (gmt 0)

that is the only name I know for it

[google.com...]

phranque

WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 3551541 posted 11:54 pm on Jan 21, 2008 (gmt 0)

jatar_k:
or under the circumstances, maybe [google.com...]
=8)

galench:
your simplest redirect.cgi for the sample (WebmasterWorld) url:
#!/usr/bin/perl

use CGI qw(:standard);
print redirect(param('url'));


galench

5+ Year Member



 
Msg#: 3551541 posted 12:45 pm on Jan 22, 2008 (gmt 0)
Thanks Phranque!

I try some sites with perl redirection what you specify!

Some body can explaine to me how HTTP_REFERER is working?

Let`s examine some. For example:
1. I go googling and has found this post!
2. After this i visited this page and click on link with redirection in first my message:
http://www.searchengineworld.com/r/redirect.cgi?f=13&d=3551541&url=http://www.example93479283749.com.
3. It is redirecting me to example93479283749.com.

Now question! What HTTP_REFERER will have last site example93479283749.com? IT`s will be google or searchengineworld.com?

phranque

WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 3551541 posted 2:16 pm on Jan 22, 2008 (gmt 0)

it depends on your browser (the user_agent) but it would probably include www.searchengineworld.com

jatar_k

WebmasterWorld Administrator jatar_k us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3551541 posted 2:43 pm on Jan 22, 2008 (gmt 0)

>> perl

nice phranque ;)

in the example above you have this

google > WebmasterWorld > searchengineworld > example93479283749.com

the basics of referers would state that the referer for any page is the page before it

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved