- Installation
- Example
- Method Api
- Use Proxy
Using Composer:
composer require tioffs/badoo
require_once __DIR__ . '/vendor/autoload.php';
$badoo = new UnofficialApi\Badoo('login', 'password');
Log in and get the session
$auth = $badoo->userAuth();
#success
['user' => 0123456789]
#error
['error' => 'Authorization false']
Load authorized session
$sessionLoad = $badoo->loadSession();
#success
true
#error
false
Get user profile information
#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
]
Search for users with a filter
$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
Obtaining the data for the subsequent search filter
$city = $badoo->getCity('Moscow');
#success
countryId_regionId_cityId
#error
null
This method returns the list of visitors for the last week
$data = $badoo->getVisitors();
#result data array users
Liking user profile
$userId = 123345644;
$badoo->likeUser($userId);
#success
true
#error
false
Send private message to user
$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')
Made with ♥ from the @tioffs