How easy or hard is it to do something like this?

Joined
May 10, 2015
Messages
236
Likes
134
Degree
1
This website:
http://yourpast.life

Enter a name after the url eg
http://yourpast.life/krass

and it'll populate some random character you're supposed to be in a past life on facebook, so the clickthrough is insanely high.

Trying to execute this but with a twist, but I can't find the source code for this. Anyone know how to do this? Thanks
 
Yeah I don't need it to be super clever I'm using this because the ctr from FB is good. When you type it in fb comments it shows a preview of whatever random nonsense you're assigned to, so that's what sells the click.

Viral potential right there
 
1.
8D5V7OQ.png

2. index.php in your root subdomain/domain directory.

Code:
<?php
$name = str_replace('/','', $_SERVER['REQUEST_URI']);

/* ADD YOUR FACEBOOK ID HERE*/
$fb_app_id = "";
/* ADD YOUR GOOGLE ANALYTICS ID HERE*/
$ga_id = "";
$content = [];

/* ADD YOUR RANDOMIZED CONTENT HERE */
$content[] = [
    "title" => "builder",
    "description" => "A builder is someone who practices building, which involves rational inquiry into areas that are outside of either theology or science. The term philosopher comes from the Ancient Greek φιλόσοφος (philosophos) meaning lover of wisdom.",
];

$content[] = [
    "title" => "fluffer",
    "description" => "A fluffer is someone who practices fluffing, which involves rational fapping into areas that are outside of either theology or science.",
];

$random = array_rand($content);

echo '<HTML>';
echo '<HEAD>';
echo '<meta charset="utf-8">';
echo '<meta name="viewport" content="initial-scale=1, maximum-scale=1">';
echo '<meta name="twitter:card" value="summary"> ';
echo '<meta property="fb:app_id" content="' . $fb_app_id . '" />';
echo '<meta property="og:title" content="Hello , You were a ' . $content[$random]['title']  . ' in your past life." />';
echo '<meta property="og:image" content="" />';
echo '<meta property="og:description" content="Click here to find out more about your past life!"/>';
echo '<meta property="og:url" content="" />';
echo '<meta property="og:image:width" content="400" />';
echo '<meta property="og:image:height" content="300" />';
echo '<TITLE>Hello , You were a ' . $content[$random]['title'] . ' in your past life.</TITLE>';

echo '<style>';
echo 'img { ';
echo '    width: 300;';
echo '    height: auto;';
echo '}';
echo 'p {';
echo '  display: inline-block;';
echo '}';
echo '</style>';
echo '</head>';

echo '<BODY>';
echo '<script>';
echo '  window.fbAsyncInit = function() {';
echo '    FB.init({';
echo '      appId      : ' . $fb_app_id . ',';
echo '      xfbml      : true,';
echo '      version    : "v2.9"';
echo '    });';
echo '    FB.AppEvents.logPageView();';
echo '  };';

echo '  (function(d, s, id){';
echo '     var js, fjs = d.getElementsByTagName(s)[0];';
echo '     if (d.getElementById(id)) {return;}';
echo '     js = d.createElement(s); js.id = id;';
echo '     js.src = "//connect.facebook.net/en_US/sdk.js";';
echo '     fjs.parentNode.insertBefore(js, fjs);';
echo '   }(document, "script", "facebook-jssdk"));';
echo '</script>';

echo '<DIV STYLE="text-align: center;font-size:2em;font-family:Consolas, Andale Mono, Lucida Console, Lucida Sans Typewriter, Monaco, Courier New, monospace">';

echo 'Hello ' . $name . '<br>';
echo '<font color="Red">You were a ' . $content[$random]['title'] . ' in your past life.</font>';
echo '<br><br>';
echo '</DIV>';

echo '<DIV STYLE="text-align: center;font-size:1em;font-family:Consolas, Andale Mono, Lucida Console, Lucida Sans Typewriter, Monaco, Courier New, monospace">';
echo 'Who is a ' . $content[$random]['title'] . '?';
echo '<br>';
echo '<p>' . $content[$random]['description'] .'</p>';
echo '</DIV>';

echo '<center>';
echo '<DIV STYLE="text-align: center;font-size:1em;color:#3b5998;font-family:Consolas, Andale Mono, Lucida Console, Lucida Sans Typewriter, Monaco, Courier New, monospace">';
echo '<b>Let your friends know about it - </b>';
echo '<div class="fb-share-button" data-layout="button_count" data-size="large" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u&amp;src=sdkpreparse">Share</a></div></div>';
echo '</center>';

echo '<br>';

echo '<script>';
echo '  (function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){';
echo '  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),';
echo '  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)';
echo '  })(window,document,"script","https://www.google-analytics.com/analytics.js","ga");';
echo '  ga("create", ' . $ga_id . ', "auto");';
echo '  ga("send", "pageview");';
echo '</script>';

echo '</BODY>';
echo '</HTML>';

?>

2. In your .htaccess

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?path=$1 [NC,L,QSA]

3. The code is basic, but it works. You should at least make a smarter randomizer than what's given here to emulate persistence. E.g. if user goes back into .com/doublethinker, he gets the same content. Not a difficult task.

4. Share your results.
 
Last edited:
1.
8D5V7OQ.png

2. index.php in your root subdomain/domain directory.

Code:
<?php
$name = str_replace('/','', $_SERVER['REQUEST_URI']);

/* ADD YOUR FACEBOOK ID HERE*/
$fb_app_id = "";
/* ADD YOUR GOOGLE ANALYTICS ID HERE*/
$ga_id = "";
$content = [];

/* ADD YOUR RANDOMIZED CONTENT HERE */
$content[] = [
    "title" => "builder",
    "description" => "A builder is someone who practices building, which involves rational inquiry into areas that are outside of either theology or science. The term philosopher comes from the Ancient Greek φιλόσοφος (philosophos) meaning lover of wisdom.",
];

$content[] = [
    "title" => "fluffer",
    "description" => "A fluffer is someone who practices fluffing, which involves rational fapping into areas that are outside of either theology or science.",
];

$random = array_rand($content);

echo '<HTML>';
echo '<HEAD>';
echo '<meta charset="utf-8">';
echo '<meta name="viewport" content="initial-scale=1, maximum-scale=1">';
echo '<meta name="twitter:card" value="summary"> ';
echo '<meta property="fb:app_id" content="' . $fb_app_id . '" />';
echo '<meta property="og:title" content="Hello , You were a ' . $content[$random]['title']  . ' in your past life." />';
echo '<meta property="og:image" content="" />';
echo '<meta property="og:description" content="Click here to find out more about your past life!"/>';
echo '<meta property="og:url" content="" />';
echo '<meta property="og:image:width" content="400" />';
echo '<meta property="og:image:height" content="300" />';
echo '<TITLE>Hello , You were a ' . $content[$random]['title'] . ' in your past life.</TITLE>';

echo '<style>';
echo 'img { ';
echo '    width: 300;';
echo '    height: auto;';
echo '}';
echo 'p {';
echo '  display: inline-block;';
echo '}';
echo '</style>';
echo '</head>';

echo '<BODY>';
echo '<script>';
echo '  window.fbAsyncInit = function() {';
echo '    FB.init({';
echo '      appId      : ' . $fb_app_id . ',';
echo '      xfbml      : true,';
echo '      version    : "v2.9"';
echo '    });';
echo '    FB.AppEvents.logPageView();';
echo '  };';

echo '  (function(d, s, id){';
echo '     var js, fjs = d.getElementsByTagName(s)[0];';
echo '     if (d.getElementById(id)) {return;}';
echo '     js = d.createElement(s); js.id = id;';
echo '     js.src = "//connect.facebook.net/en_US/sdk.js";';
echo '     fjs.parentNode.insertBefore(js, fjs);';
echo '   }(document, "script", "facebook-jssdk"));';
echo '</script>';

echo '<DIV STYLE="text-align: center;font-size:2em;font-family:Consolas, Andale Mono, Lucida Console, Lucida Sans Typewriter, Monaco, Courier New, monospace">';

echo 'Hello ' . $name . '<br>';
echo '<font color="Red">You were a ' . $content[$random]['title'] . ' in your past life.</font>';
echo '<br><br>';
echo '</DIV>';

echo '<DIV STYLE="text-align: center;font-size:1em;font-family:Consolas, Andale Mono, Lucida Console, Lucida Sans Typewriter, Monaco, Courier New, monospace">';
echo 'Who is a ' . $content[$random]['title'] . '?';
echo '<br>';
echo '<p>' . $content[$random]['description'] .'</p>';
echo '</DIV>';

echo '<center>';
echo '<DIV STYLE="text-align: center;font-size:1em;color:#3b5998;font-family:Consolas, Andale Mono, Lucida Console, Lucida Sans Typewriter, Monaco, Courier New, monospace">';
echo '<b>Let your friends know about it - </b>';
echo '<div class="fb-share-button" data-layout="button_count" data-size="large" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u&amp;src=sdkpreparse">Share</a></div></div>';
echo '</center>';

echo '<br>';

echo '<script>';
echo '  (function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){';
echo '  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),';
echo '  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)';
echo '  })(window,document,"script","https://www.google-analytics.com/analytics.js","ga");';
echo '  ga("create", ' . $ga_id . ', "auto");';
echo '  ga("send", "pageview");';
echo '</script>';

echo '</BODY>';
echo '</HTML>';

?>

2. In your .htaccess

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?path=$1 [NC,L,QSA]

3. The code is basic, but it works. You should at least make a smarter randomizer than what's given here to emulate persistence. E.g. if user goes back into .com/doublethinker, he gets the same content. Not a difficult task.

4. Share your results.

Thank you, mate!! Will definitely share my results here
 
esy8Y6Q.jpg


This machine is up to something...
 
I got this to work, but I want to do something different:
  1. User does the past.life/name thing in FB comments
  2. Script pulls from WP post featured image to show in fb comment preview
  3. I the user clicks on the preview, they are redirected straight to the WP post instead of the domain that hosts the script
- i don't care if the results repeat themselves
- i don't care whatever the users put in the url
EDIT: - The domain for the script is different from the domain that hosts the WP site

Is it simple to get this done on my own? If not, how do I instruct someone on fiverr to code something like this in a way that they'll understand?
 
That's not simple at all and has a high possibility of looking malicious and spammy since you are talking about hacking into the iframe of facebook comments and redirecting the unknowing customer into a different url from the source.

For what it's worth on the second part, you could use a javascript to check if the referrer is from facebook.com and if so, redirect them to the WP post.

But for all the work, you're better off putting it in a subdomain and have a navigation bar that points to your site, with a clear message "This fun tool is made by ... for more shit like this, go to ... "
 
Not sure if you're still looking for ideas, but here's a list of names matched with their "likely" professions:
Source: http://verdantlabs.com/professions/

Rabbi: Judah, Shlomo, Meir, Yosef, Moshe

Police Officer: Wayne, Kevin, Louis, Raymond, Timothy, Kim

Poet: Edgar, Hannah, Celia, Anne, Dorothy, Edmund

Photographer: Hugo, Bruno, Zoe, Tracey, Noah, Annie

Race Car Driver: Bobby, Johnny, Robbie, Jimmy, Luigi, Sebastian

Graphic Designer: Diana, Alison, Vanessa, Jessica, Kurt, Jan

Golfer: Tommy, Willie, Bud, Simon, Johnny, Bobby

Geologist: William, Frederick, Henry, Samuel, Hugh, Leonard

Meteorologist: Scott, Bill, Joe, Jim, Jeff, Mike

Rancher: Leroy, Leland, Boyd, Clifford, Roy, Judy

Guitarist: Trey, Richie, Mick, Eddie, Buddy, Sonny

Drummer: Billy, Mickey, Joey, Dave, Tommy, Chad

Car Salesman: Pete, Travis, Clay, Larry, Bob, Allen

Football Player: Darnell, Jermaine, Reggie, Derrick, Nate, Quinton

Mechanic: Randy, Patrick, Dave, Rick, Jerry, Fred

Social Worker: Penelope, Stella, Constance, Jeannette, Marsha, Vivian

Hairdresser: Patricia, Raymond, Lori, James, Robert, Susan

Electrical Engineer: Bernard, Eugene, Harvey, Alfred, Charles, Edwin

Journalist: Hanna, Gideon, Alastair, Angus, Louisa, Jonah

Accountant: Kurtis, Charmaine, Maribel, Mitzi, Adele, Mindy

Football Coach: Bill, Mike, Rich, Steve, Jim, Dan

Librarian: Abigail, Margot, Nanette, Julia, Eleanor, Johanna

Soldier: Jeremy, Jacob, Zachary, Justin, Joshua, Kyle

Historian: Henry, Adrienne, Herbert, Carolina, Theodore, Emma

Farmer: Delbert, Marlin, Duane, Darin, Mavis, Elwood

Firefighter: Ryan, Darren, Brandon, Matthew, Jeremy, Jason

Fitness Instructor: Julie, Rebecca, Virginia, Karen, Jennifer, Pamela

Lawyer: Sanford, William, Norton, Marshal, Augustus, Cecily

Songwriter: Sonny, Mick, Richie, Stevie, Billy, Benny

Insurance Salesman: Patty, Garrett, Dalton, Mac, Clark, Brent

Interior Designer: Martha, Marjorie, Elise, Melinda, Bonnie, Lynne

Biologist: Sara, Suzanne, Stuart, Nicholas, Janet, Cheryl

Judge: Josiah, Lise, Archibald, Rufus, Louise, Clement

Stuntman: Alex, Erik, Eddie, Tom, Terry, Ben

Surgeon: Barrett, Harris, Sherwin, Jefferson, Holly, Sanford

Venture Capitalist: Shawn, Guy, Nicholas, Joanna, Doug, Alexander

Veterinarian: Peggy, Sara, Tracy, Wayne, Gene, Larry
 
Back