PHP code example of pablouser1 / tikscraper
1. Go to this page and download the library: Download pablouser1/tikscraper 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/ */
pablouser1 / tikscraper example snippets
$api = new \TikScraper\Api([
'debug' => false, // Debug mode
'browser' => [
'url' => 'http://localhost:4444', // Url to your chromedriver instance
'close_when_done' => false, // Close chrome instance when request finishes
],
'verify_fp' => 'verify_...', // Cookie used for skipping captcha requests
'device_id' => '596845...' // Custom device id
'user_agent' => 'YOUR_CUSTOM_USER_AGENT_HERE',
'proxy' => 'http://user:password@hostname:port'
], $cacheEngine);
$tag = $api->hashtag('funny');
$tag->feed();
if ($hastag->ok()) {
echo $hashtag->getFull()->toJson(true);
} else {
print_r($hashtag->error());
}