{"id":47337232,"url":"https://github.com/preferred-pictures/php","last_synced_at":"2026-03-17T22:02:25.270Z","repository":{"id":57044374,"uuid":"280176840","full_name":"preferred-pictures/php","owner":"preferred-pictures","description":"A PHP client for the PreferredPictures API.","archived":false,"fork":false,"pushed_at":"2020-08-10T16:09:39.000Z","size":611,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-16T09:35:12.304Z","etag":null,"topics":["ab-testing","optimization","php-client","php-library","thompson-sampling"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preferred-pictures.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-16T14:33:39.000Z","updated_at":"2020-08-10T16:09:41.000Z","dependencies_parsed_at":"2022-08-24T04:11:18.421Z","dependency_job_id":null,"html_url":"https://github.com/preferred-pictures/php","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/preferred-pictures/php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preferred-pictures%2Fphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preferred-pictures%2Fphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preferred-pictures%2Fphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preferred-pictures%2Fphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preferred-pictures","download_url":"https://codeload.github.com/preferred-pictures/php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preferred-pictures%2Fphp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ab-testing","optimization","php-client","php-library","thompson-sampling"],"created_at":"2026-03-17T22:02:13.316Z","updated_at":"2026-03-17T22:02:25.210Z","avatar_url":"https://github.com/preferred-pictures.png","language":"PHP","readme":"# PreferredPictures PHP Client Library\n\nThe [PreferredPictures](https://preferred.pictures) PHP library provides a convenient way to call the\n[PreferredPictures](https://preferred.pictures) API for applications written in PHP.\n\n[View the PHP documentation of this module](https://preferred-pictures.github.io/php/api/classes/PreferredPictures-Client.html)\n\n[View the documentation of the PreferredPicture's API](https://docs.preferred.pictures/api-sdks/api)\n\n[Learn more about what PreferredPictures can do.](https://docs.preferred.pictures/)\n\n## Installation\n\n```\ncomposer require preferred-pictures/client\n```\n\nTo use the bindings, use Composer's autoload:\n\n```php\nrequire_once('vendor/autoload.php')\n```\n\n## Usage\n\nThe package needs to be configured with your account's identity and\nsecret key, which is available in the PreferredPictures interface.\n\n```php\n\n\n$client = new PreferredPictures\\Client(\"testidentity\", \"secret123456\");\n\n# Create a basic URL to pick between three different images.\n$url = $client-\u003ecreateChooseUrl(\n    [\"https://www.example.com/image-red.jpg\",\n     \"https://www.example.com/image-green.jpg\",\n     \"https://www.example.com/image-blue.jpg\"],\n    \"test-tournament\",\n);\n\n# Use a prefix and suffix to make specifying the options less verbose\n$url = $client-\u003ecreateChooseUrl(\n    [\"red\", \"green\", \"blue\"],\n    \"test-tournament\",\n    300,\n    6000,\n    \"https://www.example.com/image-\",\n    \".jpg\"\n);\n\n# The url returned will appear to be something like:\n#\n# https://api.preferred-pictures.com/choose-url?choices=red%2Cgreen%2Cblue\u0026tournament=testing\u0026expiration=[EXPIRATION]\u0026uid=[UNIQUEID]\u0026ttl=600\u0026prefix=https%3A%2F%2Fexample.com%2Fjacket-\u0026suffix=.jpg\u0026identity=test-identity\u0026signature=[SIGNATURE]\n#\n# which should be placed where it is needed in your application or templates.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreferred-pictures%2Fphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreferred-pictures%2Fphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreferred-pictures%2Fphp/lists"}