{"id":16731646,"url":"https://github.com/missinglink/mongrel2-php","last_synced_at":"2025-04-10T11:24:05.152Z","repository":{"id":3343698,"uuid":"4388255","full_name":"missinglink/mongrel2-php","owner":"missinglink","description":"Simple library for writing Mongrel2 clients in PHP 5.3+ using zmq zeromq 2.2","archived":false,"fork":false,"pushed_at":"2013-05-03T20:48:05.000Z","size":416,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T10:11:30.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"eskimosoup/notaries_search","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/missinglink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-20T23:30:09.000Z","updated_at":"2016-05-02T15:47:41.000Z","dependencies_parsed_at":"2022-08-20T15:40:52.341Z","dependency_job_id":null,"html_url":"https://github.com/missinglink/mongrel2-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fmongrel2-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fmongrel2-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fmongrel2-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fmongrel2-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/missinglink","download_url":"https://codeload.github.com/missinglink/mongrel2-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208612,"owners_count":21065203,"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-10-12T23:38:18.006Z","updated_at":"2025-04-10T11:24:05.130Z","avatar_url":"https://github.com/missinglink.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Simple library for writing Mongrel2 clients in PHP 5.3+ using zeromq 2.2\n========================================================================\n\nInstall\n--------\n\n```bash\necho '[Installing ØMQ 2.2]' \u0026\u0026 ./install/zmq22-install.sh\necho '[Installing ØMQ PHP Module]' \u0026\u0026 ./install/zmqphp-install.sh\necho '[Installing pecl_http Module]' \u0026\u0026 ./install/pecl-http-install.sh\necho '[Installing Composer]' \u0026\u0026 curl -s http://getcomposer.org/installer | php \u0026\u0026 php composer.phar install\necho '[Installing Mongrel2 Web Server]' \u0026\u0026 ./install/mongrel2-zmq2-install.sh\n```\n\nSimple Client Example\n---------------------\n\n```php\n// Create a new Mongrel client\n$mongrelClient = new \\Mongrel\\Client(\n    new \\ZMQContext,\n    new \\Mongrel\\Dsn( 'tcp://127.0.0.1:9997' ),\n    new \\Mongrel\\Dsn( 'tcp://127.0.0.1:9996' )\n);\n\n// Create a new Mongrel HTTP client\n$client = new \\Mongrel\\Http\\Client( $mongrelClient );\n\n// Listen for requests\nwhile( true )\n{\n    /* @var $request \\Mongrel\\Http\\Request */\n    $request = $client-\u003erecv();\n\n    // Build a response\n    $response = new \\Mongrel\\Http\\Response( '\u003ch1\u003eHello World!\u003c/h1\u003e', array( 'Content-Type' =\u003e 'text/html' ) );\n\n    // Send response back to the browser that requested it\n    $client-\u003ereply( $response, $request );\n\n    // Clean up\n    unset( $request, $response );\n}\n```\n\nMustache View Renderer Example\n------------------------------\n\n```bash\nsh examples/mongrel-start.sh\nsh examples/mustache/devices/mustache-server.sh # (in another window)\n```\n\nOpen [localhost:8001](http://localhost:8001/) in your web browser\n\nTests\n--------\n\n```bash\nphpunit\n```\n\nTravis CI\n---------\n\n![travis-ci](http://cdn-ak.favicon.st-hatena.com/?url=http%3A%2F%2Fabout.travis-ci.org%2F)\u0026nbsp;http://travis-ci.org/#!/missinglink/mongrel2-php\n\n![travis-ci](https://secure.travis-ci.org/missinglink/mongrel2-php.png?branch=master)\n\nLicense\n------------------------\n\nReleased under the MIT(Poetic) Software license\n\n    This work 'as-is' we provide.\n    No warranty express or implied.\n    Therefore, no claim on us will abide.\n    Liability for damages denied.\n\n    Permission is granted hereby,\n    to copy, share, and modify.\n    Use as is fit,\n    free or for profit.\n    These rights, on this notice, rely.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmissinglink%2Fmongrel2-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmissinglink%2Fmongrel2-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmissinglink%2Fmongrel2-php/lists"}