Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

HTTP_REFERER "control"

by freak
on May 09, 2004 at 15:08 UTC ( #351842=perlquestion: print w/replies, xml ) Need Help??

freak has asked for the wisdom of the Perl Monks concerning the following question:

when i connect to a website, can i "control" the HTTP_REFERER ? by that i mean - if can i send the website i connect to some specific HTTP_REFERER message (so that the website will see as if i entered it through another website) ? and if i can do that, please tell me how.

Replies are listed 'Best First'.
Re: HTTP_REFERER "control"
by perrin (Chancellor) on May 09, 2004 at 16:32 UTC
    freak, the bottom line is, you will be traceable. If someone really wants to find out who has been ripping them off on their popup ads, and is willing to put some effort into it, they will be able to trace it to you, no matter what you do. You could make it somewhat difficult for them, but that would require you to actually make an effort to learn some things about the Internet, HTTP, TCP/IP, and various security systems, which you seem to be totally unwilling to do. If you attempt to rip off some site with your current level of knowledge, you might as well just mail your name and address to the FBI.
Re: HTTP_REFERER "control"
by jeffa (Bishop) on May 09, 2004 at 15:20 UTC

    Hello freak. The word "on the street" is that you are trying to write code that will do BAD THINGS. Such as using a bot to submit to a website to produce bogus "hits".

    Before we answer any more of your questions, would you mind answering one of mine? What exactly are you trying to do? And by that i don't mean repeat your question. I mean "what are you building and what is it going to do?"

    Thank you.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: HTTP_REFERER "control"
by Juerd (Abbot) on May 09, 2004 at 20:00 UTC

    If you have to ask, the answer is: no, you cannot.

    Please become a real hacker instead of the pathetic kind you're trying to be. Note that I'm talking about "a person who enjoys exploring the details of programmable systems and how to stretch their capabilities, as opposed to most users, who prefer to learn only the minimum necessary," not about "someone who plays golf poorly" :).

    You want to learn only the minimum necessary, and you want to learn the little that you do for the wrong reasons.

Mr. Webster if you will be so kind...
by Mr. Muskrat (Canon) on May 09, 2004 at 20:17 UTC

    earn
          2. To acquire by labor, service, or performance; to deserve
          and receive as compensation or wages; as, to earn a good
          living; to earn honors or laurels.

    fraud
          2. (Law) An intentional perversion of truth for the purpose
          of obtaining some valuable thing or promise from another.

    Source: Webster's Revised Unabridged Dictionary (1913)

Re: HTTP_REFERER "control"
by blue_cowdawg (Monsignor) on May 09, 2004 at 15:30 UTC

        when i connect to a website, can i "control" the HTTP_REFERER ?

    Could you possibly be any more blatant? At face value your own words would indicate you are attempting to commit fraud. I'm sorry... if you aren't knowledgeable enough to do it on your own I am not going to help you commit fraud.

    I guess you like downvotes freak, eh?

      Although I don't trust freak's intentions, commiting "fraud" can be rather fun too.

      http://www.goto.com/ used to have links that would cost the webpage owner money for each "click". It even had the amount of dollars listed. Now how fun is it to "click" on those links that would bring you to spammer related software? *serpent grin*. LWP is/was perfect for that. Fraudulent, but very nice IMHO.

      --
      b10m

      All code is usually tested, but rarely trusted.

            commiting "fraud" can be rather fun too.

        There is fraud and then there is "screwing with somebody". While the former gets my "Irish up" the latter can be a fine way to spend some quality time. As long as it does not take on criminal dimensions.

    A reply falls below the community's threshold of quality. You may see it by logging in.
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: HTTP_REFERER "control"
by AltBlue (Chaplain) on May 09, 2004 at 15:21 UTC
    "Referer" is just another HTTP Request header :)
    Just add this header with the value you want to your request and that's all.

    UPDATE: jeffa requested to drop the example code as freak's history here isn't good at all ;)
    Anyway, I'm sure googling for lwp referer would be (too) easy to get the answer he wants :(

Re: HTTP_REFERER "control"
by flyingmoose (Priest) on May 10, 2004 at 16:06 UTC
    freak, you are screwing up dude. You don't mean "earn popups", you mean "3@R|\| popups" or perhaps "0WNZZ0R popups". Read the script kiddie book again, and come back in 2 weeks.
Re: HTTP_REFERER "control"
by b10m (Vicar) on May 09, 2004 at 15:22 UTC

    Yet another question which shows you really need to read up on LWP and HTTP headers in general. It's all there ;-) But ok, a quick'n'dirty example:

    use LWP::UserAgent; my $ua = LWP::UserAgent->new(); my $req = HTTP::Request->new( GET => $url ); $req->header(REFERER => "http://faked.referer.invalid"); $ua->request($req);
    --
    b10m

    All code is usually tested, but rarely trusted.
    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://351842]
Approved by castaway
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2021-01-27 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?