PHP code example of tioffs / badoo

1. Go to this page and download the library: Download tioffs/badoo library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tioffs / badoo example snippets



$badoo = new UnofficialApi\Badoo('login', 'password');

$auth = $badoo->userAuth();
#success
['user' => 0123456789]
#error
['error' => 'Authorization false']

$sessionLoad = $badoo->loadSession();
#success
true
#error
false

#default return current user profile
$dataUser = $badoo->getUser();
#return user profile
$dataUser = $badoo->getUser(123456789);
#data user array
[
    'age' => 23,  //user age
    'albums' => [], //albums photo array
    'displayed_about_me' => [], //profile about text array
    'dob' => '1996-02-02' // date of birth
    'gender': 1, // 1 - men, 2 - women
    'is_blocked': false,
    'is_deleted': false,
    'is_favourite': false,
    'name' => 'Nikolas', // user name
    'online_status' => 3, // 1 - online, 2,3 - was online time
    'online_status_text' => 'Was online 8 hours ago',
    'photo_count' => 2, //count photo
    'profile_fields' => [], //the information is filled
    'profile_photo' => [], //current user photo
    'user_id' => 123345644 // user id

]

$gender = 1; // 1 - men, 2 - women
$AgeStart = 18; // filter start age
$AgeEnd = 60; // filter end age
$count = 150; // count users
$offset = 1; //offset count
$country = ''; //default all city ''; use method getCity
$user = $badoo->searchUser($gender, $AgeStart, $AgeEnd, $count, $offset, $country);
#result data array users

$city = $badoo->getCity('Moscow');
#success
countryId_regionId_cityId
#error
null

$data = $badoo->getVisitors();
#result data array users

$userId = 123345644;
$badoo->likeUser($userId);
#success
true
#error
false

$userId = 123345644;
$message = 'test message';
$badoo->sendMessage($userId, $message);
#success
uid message
#error
false

#use proxy http/https
$badoo->setProxy('127.0.0.1', '8080')
#use proxy authorization
$badoo->setProxy('127.0.0.1', '8080', 'login', 'password')