1. Go to this page and download the library: Download spawnrad/tiktok 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/ */
spawnrad / tiktok example snippets
$api = new \TikScraper\Api([
'user_agent' => 'YOUR_CUSTOM_USER_AGENT_HERE',
'proxy' => [
'host' => 'EXAMPLE_HOST',
'port' => 8080,
'user' => 'EXAMPLE_USER',
'password' => 'EXAMPLE_PASSWORD'
],
// More info about signing below
'signer' => [
'method' => 'remote',
'url' => 'http://localhost:8080/signature',
'close_when_done' => true // --> Only for browser signing <-- Set to true if you want to quit the browser after making the request (default true)
]
], $cacheEngine);
$hashtag = $api->hashtag('funny');
echo $hashtag->feed()->getFull()->toJson();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.