<?php
// by Dieguit0sk8
$fb = $_POST[url];
$host = $_SERVER[HTTP_HOST];
if (preg_match('/facebook.com/i', $fb)) {
$url = $fb;
$ch = curl_init();
$timeout = 0;
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0');
curl_setopt($ch,CURLOPT_HTTPHEADER,array('Accept-Language: es-es,en'));
curl_setopt($ch,CURLOPT_HEADER,0);
curl_setopt($ch,CURLOPT_ENCODING, "UTF-8");
curl_setopt($ch,CURLOPT_REFERER, 'http://facebook.com');
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_BINARYTRANSFER,1);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
if (preg_match('|"entity_id":"(.*?)"}]|is',$data,$status)) {
$id = $status[1];
$idx = '<h1>ID: '.$id.'</h1>';
}
}
// Forobeta.com
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Find my Facebook ID</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<style> #success-wrap,p.caption,p.credits{text-align:center}body{margin-top:1em}h1{margin-bottom:.5em}h3{margin:1.4em 0 .8em}form{margin-bottom:3em}label{font-weight:400;display:block;margin-top:2em}p.lead{color:#222}p.small{color:#777}p.caption{font-style:italic;margin-bottom:3.5em}p a{text-decoration:underline}p a.btn{text-decoration:none}#other-problems{font-size:1.2em;margin-top:2em}#success-wrap{margin-bottom:2.5em}#success-wrap code{font-size:50px;display:inline-block;margin-bottom:.5em}ul{font-size:15px;margin-bottom:2em}ul.examples{margin:1.1em 0}ul.examples li{margin-bottom:.25em}ul.examples.good code{color:green}li{margin-bottom:.75em}img{border:10px solid #ccc;margin:.75em 0 .5em;max-width:100%;height:auto}p.credits{margin-top:4em;opacity:.65} </style>
</head>
<body>
<div class="container" style="max-width: 600px;">
<h1>Find your Facebook ID</h1>
<p class="lead">
To find your Facebook personal numeric ID for fb:admins, social plugins, and more,
enter your <b>Facebook personal profile URL</b> below:
</p>
<form method="POST">
<div class="form-group">
<input
name="url"
type="text"
placeholder="https://www.facebook.com/YourProfileName"
class="input-lg form-control">
</input>
</div>
<button type="submit" class="btn btn-primary">Find numeric ID →</button>
</form>
<?php echo $idx; ?>
<h3>What's my personal profile URL?</h3>
<p>
Your Facebook personal profile URL is the the URL you get to when you click on your name
in the upper left of the Facebook home page. It <b>should look</b> something like this:
</p>
<ul class="examples good">
<li><code>https://www.facebook.com/JohnDoe</code></li>
<li><code>https://m.facebook.com/sally.struthers</code></li>
<li><code>https://www.facebook.com/profile.php?id=24353623</code></li>
</ul>
<p>
Your personal profile <b>does not</b> look anything like these examples:
</p>
<ul class="examples">
<li><code>https://www.facebook.com</code></li>
<li><code>Sally Struthers</code></li>
<li><code>sally@struthers.com</code></li>
</ul>
<p>
<b>Still struggling?</b> If you are logged into Facebook in your current browser,
you should be able to <a href="https://www.facebook.com/profile.php" target="_blank">click this link</a>,
and it will redirect you to your profile page. Then, copy the URL from your
browsers address bar and come back here to try again.
</p>
<h3>What's this all about?</h3>
<p class="small">
This tool helps you easily find your Facebook numeric personal ID for fb:admins social plugins and more!
For integrations of certain Facebook social plugins, like the "Like" button and
"Like box", and others, Facebook requires that you know your Facebook numeric user
ID. Unfortunately, they make this very difficult to find, especially if you have a
so-called "vanity" personalized profile URL. If you can't find your Facebook ID,
or don't know what it is and need it, just enter your full Facebook profile URL in
the above form, and we can scrape the ID from the code of your personal profile page.
</p>
<p class="small credits">
Made by the friendly fellows who brought you <a href="http://<?php echo $host; ?>/"><?php echo $host; ?></a>.
</p>
</div>
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript"> (function() {
$.fn.shake = function (settings) {
var pos;
settings = settings || {};
$.extend(settings,{
'shakes': 2,
'distance': 14,
'duration': 250
});
return this.each(function () {
var $this = $(this);
pos = $this.css('position');
if (!pos || pos === 'static') {
$this.css('position', 'relative');
}
for (var x = 1; x <= settings.shakes; x++) {
$this
.animate({ left: settings.distance * -1 }, (settings.duration / settings.shakes) / 4)
.animate({ left: settings.distance }, (settings.duration / settings.shakes) / 2)
.animate({ left: 0 }, (settings.duration / settings.shakes) / 4);
}
});
};
var placeholders = [
'https://m.facebook.com/sally.struthers',
'https://www.facebook.com/profile.php?id=2345',
'https://www.facebook.com/YourProfileName',
];
var $input = $("input[type='text']"),
index = 0;
setInterval(function() {
$input.attr("placeholder", placeholders[index]);
index = index === 2 ? 0 : index + 1;
}, 2000);
$("form").on("submit", function() {
if ($input.val() == "" || $input.val().indexOf("@") !== -1) {
$input.shake();
return false;
}
});
}()); </script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>