How Does Ask Peter Work? The Code Behind the Prank
Whatsapp Pinterest

For a number of years, one of my hobbies has been researching paranormal scams. These are situations where an individual claims they can predict the future, that they’ve discovered the secret to antigravity, or that they work for the government and know the truth about aliens. A common thread in all of that surreal research is that generally, an unnerving number of people are very, very gullible.

That gullibility multiplies significantly when the event being portrayed includes something that appears supernatural or “magical” in nature. Deep down, many people still want to believe in magic — and when they are presented with the opportunity to believe again, they jump all over it.

A case in point is a website that is very popular among the prankster community called Ask Peter (or Peter Answers). The footer text lists the page as a “Virtual Tarot,” as though the page truly has the ability to predict your future or answer any of your questions. In this article, I answer the question: how does Ask Peter work?

How Does Ask Peter Work? The Believer Perspective

First, I’m going to show you how the website works for the person off of the street who knows nothing about the inner workings of Ask Peter. When you first arrive at the website, you’ll see a very simple web form.

how does ask peter answers work

The point of the website is that it’s a sort of electronic “tarot” which will peek into your future and answer your questions accordingly. However, Peter is a fickle psychic, and he must be treated with respect or he won’t answer your question. Therefore, before you ask a question, you must petition Peter with the sentence, “Peter, please answer the following question:” If you’re using the Peter Answers site alone and you don’t know the secret behind the site, you’ll typically get an answer like this:

how does ask peter answers work

What’s up with that? Ah, but it’s all part of the show, folks. The magic really happens when you bring in a second person who knows Peter’s terrible secret (after reading this article, that will be you!) The second person needs to type in the petition and question for you, and then you’ll get the answer — which is usually remarkably accurate.

ask peter personal questions

If the person typing the question knows the secret, you’ll get such an answer. In the second half of this article, I’m going to share Peter’s terrible secret, and welcome you into the secret society of “Ask Peter” insiders. If you enjoy the childlike, magical perspective offered by your blissful ignorance, then stop reading this article now. Otherwise, if you would like to be immune to this particular scam How to Protect Yourself From 3 of the Biggest Online Scams Right Now How to Protect Yourself From 3 of the Biggest Online Scams Right Now People will always fall foul of the scammers. Three of the most devastating scams at the moment have yielded hundreds of millions of dollars for cybercriminals. What can you do to protect yourself? Read More , then read on.

Welcome to the Secret Society of Ask Peter

If you’ve read this far, then you feel prepared for the secret knowledge of how Ask Peter works. Let’s take a closer look.

ask peter personal questions

The ultimate secret to Ask Peter is actually a bit of creative JavaScripting What Is JavaScript and How Does It Work? What Is JavaScript and How Does It Work? What is Javascript? It's a programming language used to enhance web pages. It includes dynamically updating web pages, user interfaces and more. Let's dive into what Javascript is all about. Read More . Getting Peter to answer a question doesn’t take reverence and politeness, it takes a very plain period. That’s right — in the “Petition” field, just type a “.” and start typing the answer to the question that you’re going to ask in the next field.

At the end of the answer, type another “.” and then continue typing the rest of “Peter, please answer the following question:” To the person sitting next to you, it only appears as though you’ve typed that one question — especially if you’re a fast typist.

So, now you know the secret. Submitting the question that you’ve already entered the answer for and clicking OK will result in Peter providing your answer. The person next to you who’s watching will be astounded and flabbergasted by the amazing accuracy of this virtual tarot. Just don’t be too accurate, as you’ll raise suspicion. Once you’re through, you can proudly claim another Ask Peter believer under your belt. In doing so, you’ve perfectly portrayed the terrible gullibility that runs rampant throughout the world.

Let’s take a closer look at how the background scripting for Ask Peter actually works.

how does ask peter answers work

Now, the creators of this website were clever enough to suspect that discerning tech geeks would try peeking under the hood, so they’ve incorporated a few safeguards. The first, of course, is processing all entries through CSS using class “inp” to handle each input field. You simply can’t see how these fields are processed without access to the CSS files 10 Simple CSS Code Examples You Can Learn in 10 Minutes 10 Simple CSS Code Examples You Can Learn in 10 Minutes Want to know more about using CSS? Try these basic CSS code examples to start with, then apply them to your own web pages. Read More . However, if you look closely at the form code, you’ll discover an interesting anomaly.

At the footer of the page script, you can see various variables used to return different text to the text field:

var O000000="en",
  O00OO0O="Peter please answer the following question:",
  O000O0O="No connection.",
  O0O0O0O="You must enter a valid petition.",
  O0O0OO0="You must enter a valid question.",
  O00O000="Peter answers: ";

Each variable is given a coded name that looks similar, but it isn’t — with zero and the letter O in various places in the name. The technique is clearly intended to cover up the true purpose of the script, but it’s obvious that if you aren’t aware of the secret use of “.” behind the entry of the “answer,” then the page is coded to provide lots of different error messages back to you.

What does this mean to those of you who aren’t JavaScript programmers? It means that instead of one, single function and variable handling the input text that gets entered into each field and returning a text value to the answer field, there are multiple things that happen with every individual keypress. This means that there’s a whole lot of TomFoolery going on with the text that you enter into each text field.

Now You Know the Real Answer

The answer, of course, is that if you’re in the “Petition” field, the script returns what you type into the field, but watches for the moment you type the “.” character. At that point, it starts typing the rest of the statement “Peter, please answer…” as it saves each character you’re actually typing into a variable until you type “.” again. Finally, once you click “OK” — your saved text that was stored in a string variable is displayed below in the form of Peter’s Answer. Now that you know the inner workings of this online prank, are you more likely to try it out on a friend?

Looking for more pranks to play on your friends? How about freaking them out with fake virus pranks 4 Fake Virus Pranks to Freak Out Your Friends 4 Fake Virus Pranks to Freak Out Your Friends A fake virus prank is a fun way to mess with your friend's PC without causing lasting damage! A fake virus is a harmless joke. Read More ?

Image Credit: risnandar2/Depositphotos

Enjoyed this article? Stay informed by joining our newsletter!

Enter your Email

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Taauri Tewenea
    June 2, 2019 at 10:39 pm

    Hello there

    Well I really love to join this peter answer
    Cause I have many questions to ask
    And another question is that can I use my own language? I heard that you can speak different language

  2. Taauri Tewenea
    June 2, 2019 at 10:39 pm

    Hello there

    Well I really love to join this peter answer
    Cause I have many questions to ask
    And another question is that can I use my own language? I heard that you can speak different language

  3. Usman
    August 7, 2016 at 5:02 pm

    Friends what is petetion in peter answer?? Tell me plz

    • Remmy
      March 25, 2017 at 8:37 am

      Petition is the place where you write your answer when you're pranking someone.
      It is the same like in where there is named CAPTCHA just to trick people that you have to write this phrase always.

      So just press the "." and start writing your answer of the question you gonna ask. Than at the end, finish it with another "." and you'll see you answer

  4. Joy
    June 7, 2016 at 2:34 am

    It doesn't work for me

    • Tasew
      June 23, 2017 at 3:59 am

      It's does not work for me

  5. Dillivala
    May 9, 2016 at 3:05 pm

    Visited Peter Answers today after a good 7 years! Back then, I was plying pranks on my friends at my college hostel for several days until they caught the trick! Of course, my typing speed helped.

    • Remmy
      March 25, 2017 at 8:41 am

      I switched to which I'm using it to prank friends that are scared of "internet knowing everything about them"

  6. kuldeep
    April 1, 2016 at 1:33 am

    Can anyone tell what is the truth behind the peter answer because the site gives all answer correct ? I m from Delhi,india.. please answer me @

    I m surprised...

    • Adan Zari
      February 22, 2017 at 9:03 am

      helo dear

      what is peter and how does it work ?

  7. sathvik
    December 16, 2015 at 4:38 pm

    it's not a prank it's way more this website has no editors and can tell the names of everyone around you as well as personal relationships and also produces dark things such as friends being possessed by it and referring to the bible like john 6:64 ( meaning it will eradicate all who don't believe) and being a medium for a dead spirit

  8. Anonymous
    April 10, 2015 at 10:36 am

    i think there is really something than that. i can bet with my dog that i had this fun with my friends next door and none of this till now except me. we asked bunch of questions without the "." thingy but then guess what, peter did answer all d questions correctly. one of my friends just came back from having her bath and I asked this myself of what she was wearing without the secret stuff and peter did answer it correctly. It was all fun and all it still is, but i think there is something more to it than meets the eye....

  9. Anonymous
    April 26, 2010 at 11:58 am

    There has to be more to this than that. My kids had their friends over and they were on the site asking questions. I was sitting on the couch and was speaking out loud. Peter would put a comment at the end of the answer referring to my comment. My daughter's boyfriend came over and she was showing him the site and when she typed in When is Robert's birthday? He answered and also told him he was wearing a white undershirt with a Biloxi High shirt over it. I can go on and on about this but there is NO WAY "Peter" could know the answers he did. It was a 12 yr old boy asking the questions I was speaking out loud and this 12 yr old boy did not know the answers to any of them.

    • Ryan Dube
      April 26, 2010 at 1:27 pm

      Trust me, the person typing in the questions knew the answers. There's nothing more to it than that, and the effect is even better if the person doing the typing is a good typist and learned many of the answers beforehand.

  10. H
    April 8, 2010 at 12:29 pm

    Haha this girl I tutor did this to me and it FREAKED me out. She asked it what we were doing and it answered, "History homework and it's boring you both" haha. Then, she asked "Who am I with right now" and it said my full name yikes! Really fun for her but not for me until I figured it out.

  11. Tony
    February 22, 2010 at 8:23 am

    Very cool code behind the prank.

  12. Jonathan Peel
    February 10, 2010 at 11:38 pm

    Been using Ask Peter for quite a long time now...

    It's great fun for a very slow Friday afternoon at work...

  13. Larry B.
    February 10, 2010 at 5:49 pm

    Hahaha, excellent!

  14. Jonathan Bennett
    February 10, 2010 at 4:16 pm

    How clever. I'm gonna have some fun and mess with my nieces using this site. :)

    • muddassir
      March 5, 2017 at 8:17 pm

      How shoull it work i try this code . Bt all answer umwanted from me its a fake i think

      • gopal
        April 7, 2017 at 10:16 am

        Its true

      • gopal
        April 7, 2017 at 10:16 am

        That's true