{"id":23047411,"url":"https://github.com/moceanapi/mocean-sdk-php7","last_synced_at":"2025-07-26T21:12:02.965Z","repository":{"id":44511747,"uuid":"342194833","full_name":"MoceanAPI/mocean-sdk-php7","owner":"MoceanAPI","description":"Mocean SDK","archived":false,"fork":false,"pushed_at":"2022-10-18T07:24:42.000Z","size":207,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T10:43:58.550Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/MoceanAPI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-25T09:43:11.000Z","updated_at":"2022-10-18T07:21:57.000Z","dependencies_parsed_at":"2022-09-14T19:22:30.911Z","dependency_job_id":null,"html_url":"https://github.com/MoceanAPI/mocean-sdk-php7","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoceanAPI%2Fmocean-sdk-php7","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoceanAPI%2Fmocean-sdk-php7/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoceanAPI%2Fmocean-sdk-php7/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoceanAPI%2Fmocean-sdk-php7/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MoceanAPI","download_url":"https://codeload.github.com/MoceanAPI/mocean-sdk-php7/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246927807,"owners_count":20856193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-15T22:33:30.188Z","updated_at":"2025-04-03T02:45:10.296Z","avatar_url":"https://github.com/MoceanAPI.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"MoceanAPI Client Library for PHP \n============================\n[![Latest Stable Version](https://img.shields.io/packagist/v/mocean/client.svg)](https://packagist.org/packages/mocean/client7)\n[![build](https://github.com/MoceanAPI/mocean-sdk-php7/actions/workflows/build.yml/badge.svg)](https://github.com/MoceanAPI/mocean-sdk-php7/actions/workflows/build.yml)\n[![codecov](https://img.shields.io/codecov/c/github/MoceanAPI/mocean-sdk-php.svg)](https://codecov.io/gh/MoceanAPI/mocean-sdk-php)\n[![codacy](https://img.shields.io/codacy/grade/7a1e94f1c1ea40fdbfa362ecbbc4b2f3.svg)](https://app.codacy.com/project/MoceanAPI/mocean-sdk-php/dashboard)\n[![StyleCI](https://github.styleci.io/repos/138724921/shield?branch=master)](https://github.styleci.io/repos/138724921)\n[![License](https://img.shields.io/packagist/l/mocean/client.svg)](https://packagist.org/packages/mocean/client)\n[![Total Downloads](https://img.shields.io/packagist/dt/mocean/client.svg)](https://packagist.org/packages/mocean/client)\n\n*This library requires a minimum PHP version of 5.5*\n\nThis is the PHP client library for use Mocean's API. To use this, you'll need a Mocean account. Sign up [for free at \nmoceanapi.com][signup].\n\n * [Installation](#installation)\n * [Usage](#usage)\n * [Example](#example)\n\n## Installation\n\nTo use the client library you'll need to have [created a Mocean account][signup]. \n\nTo install the PHP client library using Composer.\n\n```bash\ncomposer require mocean/client7\n```\n\n## Usage\n\nIf you're using composer, make sure the autoloader is included in your project's bootstrap file:\n\n```php\nrequire_once \"vendor/autoload.php\";\n```\n    \nCreate a client with your API key and secret:\n\n```php\nuse Mocean\\Client;\nuse Mocean\\Client\\Credentials\\Basic;\n\n$mocean = new Client(new Basic('API_KEY_HERE','API_SECRET_HERE'));\n```\n\n## Example\n\nTo use [Mocean's SMS API][doc_sms] to send an SMS message, call the `$mocean-\u003emessage()-\u003esend();` method.\n\nThe API can be called directly, using a simple array of parameters, the keys match the [parameters of the API][doc_sms].\n\n```php\n$res = $mocean-\u003emessage()-\u003esend([\n    'mocean-to' =\u003e '60123456789',\n    'mocean-from' =\u003e 'MOCEAN',\n    'mocean-text' =\u003e 'Hello World'\n]);\n\necho $res;\n```\n\n### Responses\n\nFor your convenient, the API response data can be accessed either using php `object` style or `array` style\n\n```php\necho $res;            //show full response string\necho $res['status'];  //show response status, '0' in this case\necho $res-\u003estatus;    //same as above\n```\n\n## Documentation\n\nKindly visit [MoceanApi Docs][doc_main] for more usage\n    \n## License\n\nThis library is released under the [MIT License][license]\n\n[signup]: https://dashboard.moceanapi.com/register?medium=github\u0026campaign=sdk-php\n[doc_main]: https://moceanapi.com/docs/?php\n[doc_sms]: https://moceanapi.com/docs/?php#send-sms\n[license]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoceanapi%2Fmocean-sdk-php7","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoceanapi%2Fmocean-sdk-php7","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoceanapi%2Fmocean-sdk-php7/lists"}