Skip to content

Instantly share code, notes, and snippets.

@kix2902
kix2902 / sync.php
Created September 11, 2020 16:22
Simple script to sync watched episodes and movies from Trakt.tv to any list of IMDb (it hasn't any API available so the calls are made using captured data from a real request in its website) (I know this is against its TOS but the script is for personal use, not commercial).
<?php
$traktApiClientId = "TRAKT-APP-CLIENTID"; // You can create an app in https://trakt.tv/oauth/applications
// This fields can be extracted from a real request to add a title to a list
$imdbListId = "list-id"; // list where you want to add watched titles, captured from url called with this format: "https://www.imdb.com/list/<<list-id>>/<<title-id>>/add" (list-id is the needed value)
$imdbCookie = "cookie"; // request header with name "cookie", it must be copied exactly as sent from the website
$imdbPost = "post-data"; // data sent in the body of the request
// TRAKT