Chào mừng!

Bằng cách đăng ký với chúng tôi, bạn sẽ có thể thảo luận, chia sẻ và nhắn tin riêng tư với các thành viên khác trong cộng đồng của chúng tôi.

Đăng ký ngay!
  • Truy cập và ủng hộ DienDanIT.NET bằng cách click dăm 3 cái quảng cáo để duy trì sever nhé.

Cần giúp Api get id facebook

Tham gia
8/11/18
Bài viết
64
Lượt Thích
9
VNĐ
4,649
VNĐ
4,649
~~ tường ổng share chứ làm câu lại là mình đây nghe cái kích thích vl ><
 
Tham gia
8/11/18
Bài viết
64
Lượt Thích
9
VNĐ
4,649
VNĐ
4,649
Mã:
<?php 
$token = '';

?>
<style>
            .login{
                width:550px;
            }
            .login .cx-txt{
                background-color: #fff;
                border: 2px solid #222;
                padding: 10px 20px;
                color: #222;
                width: 100%;
                margin:5px 0 5px 0;
                border-top-right-radius:  2px;
                border-bottom-right-radius:  2px;
                outline: none;
            }
            .login .cx-txt:focus{
                border: 2px solid #161616;
                background-color: #f9f9f9;
            }
            .login .cx-txt::-webkit-input-placeholder { /* WebKit, Blink, Edge */
                color:#999;
            }
            .login .cx-txt:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
                color:#999;
                opacity:1;
            }
            .login .cx-txt::-moz-placeholder { /* Mozilla Firefox 19+ */
                color: #999;
                opacity:1;
            }
            .login .cx-txt:-ms-input-placeholder { /* Internet Explorer 10-11 */
                color:#999;
            }
            .login .cx-txt::-ms-input-placeholder { /* Microsoft Edge */
                color:#999;
            }
            .btn-like{
                background-color: #222;
                border: none;
                color: #fff;
                padding: 15px 20px;
                border-radius: 5px;
                text-transform:uppercase;
                width: 50%;
                margin: 20px 0 20px 0;
                transition: 2s;
                font-size: 18px;
                font-weight: bold;
            }
            .btn-like:hover{
                background-color:#1b1d1c;
            }
        </style>
<style>
.footerover{
    background: rgb(71, 83, 249);
    color: #fff;
    display: block;
    position: fixed;
    bottom: 0;
    z-index: 20;
    width: 100%;
    padding: 10px 0px;
    text-align: center;
    padding: 0px 0px;
}
</style>
<div id="content" class="ui-content ui-content-aside-overlay">
    <div class="ui-content-body">
        <div class="container">
            <div class="row">
                <div class="col-md-12">

                    <div class="panel">
                        <div class="panel-body">
                            <b>Search Facebook ID</b>
                            <center>
                                <form action="" method="POST"> 
                                <div id="ocultar">
                                    <div class="login"><br />
                                        <input type="text" name="url" class="cx-txt" id="url" placeholder="Ex: https://www.facebook.com/falaliker.com">
<?php
$action = $_POST['action'];
        if ($action == 'Get_Id'){
            $url = $_POST['url'];
            $id = substr(strrchr($url,'/'),1);
            if ($id){
                $json = json_decode(curl('https://graph.facebook.com/'.$id.'?access_token='.$token), true);
            } else {
                $json = json_decode(curl('https://graph.facebook.com/'.$url.'?access_token='.$token), true);
            }
            if (strpos($url, 'facebook.com') !== false){
                if($json['id']){
                    echo '<b>ID FACEBOOK: <span class="label label-info">'.$json['id'].'</span></b>';
                } else {
                    echo '<b>ID FACEBOOK: <span class="label label-info">We did not find this facebook ID</span></b>';
                }
            } else if ($json['error']){
                echo '<b>ID FACEBOOK: <span class="label label-info">We did not find this facebook ID</span></b>';
            } else {
                echo '<b>ID FACEBOOK: <span class="label label-info">'.$json['id'].'</span></b>';
            }
        }

function curl($url) {
    $ch = curl_init();
    $timeout = 15;
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.52 Safari/537.36");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
    curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    curl_setopt($ch,CURLOPT_ENCODING , "gzip");
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}
?>
                                    </div>
                                    <button class="btn-like" type="sumbit" id="find_id" value="Get_Id" name="action">Lấy ID Ngay</button><hr />
                                    <div class="termos" id="result_z">
                                        <div id="fbid"><p class="green">* Example link.</p><p>- https://www.facebook.com/falaliker.com</p><p>- https://www.facebook.com/4</p></div>
                                    </div>
                                </div></form>
                            </center>
                            <hr />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
full nhé :V vứt token vào là run
 

Trần Kỳ Nhân

fb.com/trankynhanit
Thành viên BQT
Người Điều Hành Cấp Cao
DienDanIT 2018
Tham gia
1/11/18
Bài viết
383
Lượt Thích
340
VNĐ
9,594
VNĐ
9,594
PHP:
$url_profile = 'https://www.facebook.com/trankynhanit';
$options = array('url' => $url_profile);
$ch = curl_init('https://findmyfbid.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, count($options));
curl_setopt($ch, CURLOPT_POSTFIELDS, $options);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
$result = curl_exec($ch);
curl_close($ch);
$data = json_decode($result, true);
echo $data['id'];
 

Duy Khang

Premium
Tham gia
13/11/18
Bài viết
390
Lượt Thích
56
VNĐ
7,007
VNĐ
7,007
Mã:
<?php
$token = '';

?>
<style>
            .login{
                width:550px;
            }
            .login .cx-txt{
                background-color: #fff;
                border: 2px solid #222;
                padding: 10px 20px;
                color: #222;
                width: 100%;
                margin:5px 0 5px 0;
                border-top-right-radius:  2px;
                border-bottom-right-radius:  2px;
                outline: none;
            }
            .login .cx-txt:focus{
                border: 2px solid #161616;
                background-color: #f9f9f9;
            }
            .login .cx-txt::-webkit-input-placeholder { /* WebKit, Blink, Edge */
                color:#999;
            }
            .login .cx-txt:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
                color:#999;
                opacity:1;
            }
            .login .cx-txt::-moz-placeholder { /* Mozilla Firefox 19+ */
                color: #999;
                opacity:1;
            }
            .login .cx-txt:-ms-input-placeholder { /* Internet Explorer 10-11 */
                color:#999;
            }
            .login .cx-txt::-ms-input-placeholder { /* Microsoft Edge */
                color:#999;
            }
            .btn-like{
                background-color: #222;
                border: none;
                color: #fff;
                padding: 15px 20px;
                border-radius: 5px;
                text-transform:uppercase;
                width: 50%;
                margin: 20px 0 20px 0;
                transition: 2s;
                font-size: 18px;
                font-weight: bold;
            }
            .btn-like:hover{
                background-color:#1b1d1c;
            }
        </style>
<style>
.footerover{
    background: rgb(71, 83, 249);
    color: #fff;
    display: block;
    position: fixed;
    bottom: 0;
    z-index: 20;
    width: 100%;
    padding: 10px 0px;
    text-align: center;
    padding: 0px 0px;
}
</style>
<div id="content" class="ui-content ui-content-aside-overlay">
    <div class="ui-content-body">
        <div class="container">
            <div class="row">
                <div class="col-md-12">

                    <div class="panel">
                        <div class="panel-body">
                            <b>Search Facebook ID</b>
                            <center>
                                <form action="" method="POST">
                                <div id="ocultar">
                                    <div class="login"><br />
                                        <input type="text" name="url" class="cx-txt" id="url" placeholder="Ex: https://www.facebook.com/falaliker.com">
<?php
$action = $_POST['action'];
        if ($action == 'Get_Id'){
            $url = $_POST['url'];
            $id = substr(strrchr($url,'/'),1);
            if ($id){
                $json = json_decode(curl('https://graph.facebook.com/'.$id.'?access_token='.$token), true);
            } else {
                $json = json_decode(curl('https://graph.facebook.com/'.$url.'?access_token='.$token), true);
            }
            if (strpos($url, 'facebook.com') !== false){
                if($json['id']){
                    echo '<b>ID FACEBOOK: <span class="label label-info">'.$json['id'].'</span></b>';
                } else {
                    echo '<b>ID FACEBOOK: <span class="label label-info">We did not find this facebook ID</span></b>';
                }
            } else if ($json['error']){
                echo '<b>ID FACEBOOK: <span class="label label-info">We did not find this facebook ID</span></b>';
            } else {
                echo '<b>ID FACEBOOK: <span class="label label-info">'.$json['id'].'</span></b>';
            }
        }

function curl($url) {
    $ch = curl_init();
    $timeout = 15;
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.52 Safari/537.36");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
    curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    curl_setopt($ch,CURLOPT_ENCODING , "gzip");
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}
?>
                                    </div>
                                    <button class="btn-like" type="sumbit" id="find_id" value="Get_Id" name="action">Lấy ID Ngay</button><hr />
                                    <div class="termos" id="result_z">
                                        <div id="fbid"><p class="green">* Example link.</p><p>- https://www.facebook.com/falaliker.com</p><p>- https://www.facebook.com/4</p></div>
                                    </div>
                                </div></form>
                            </center>
                            <hr />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
full nhé :v vứt token vào là run
tks bác ,ngon :v
 
Top Bottom