{"id":36399432,"url":"https://github.com/rtckit/php-pcap-ffi","last_synced_at":"2026-01-11T16:02:16.351Z","repository":{"id":46286390,"uuid":"292377144","full_name":"rtckit/php-pcap-ffi","owner":"rtckit","description":":mag: PHP Packet Capture Library","archived":false,"fork":false,"pushed_at":"2022-12-01T05:01:05.000Z","size":34,"stargazers_count":9,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-04T08:59:59.014Z","etag":null,"topics":["ffi","network-security","packet-capture","packet-sniffer","pcap","php-library"],"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/rtckit.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":"2020-09-02T19:34:01.000Z","updated_at":"2024-01-19T01:09:48.000Z","dependencies_parsed_at":"2023-01-22T09:15:17.347Z","dependency_job_id":null,"html_url":"https://github.com/rtckit/php-pcap-ffi","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/rtckit/php-pcap-ffi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtckit%2Fphp-pcap-ffi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtckit%2Fphp-pcap-ffi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtckit%2Fphp-pcap-ffi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtckit%2Fphp-pcap-ffi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtckit","download_url":"https://codeload.github.com/rtckit/php-pcap-ffi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtckit%2Fphp-pcap-ffi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28312150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"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":["ffi","network-security","packet-capture","packet-sniffer","pcap","php-library"],"created_at":"2026-01-11T16:02:15.621Z","updated_at":"2026-01-11T16:02:16.340Z","avatar_url":"https://github.com/rtckit.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Packet Capture via FFI\n\nStream driven PHP packet capture library, leveraging libpcap via FFI.\n\n[![Build Status](https://travis-ci.com/rtckit/php-pcap-ffi.svg?branch=master)](https://travis-ci.com/rtckit/php-pcap-ffi)\n[![Latest Stable Version](https://poser.pugx.org/rtckit/pcap-ffi/v/stable.png)](https://packagist.org/packages/rtckit/pcap-ffi)\n[![Maintainability](https://api.codeclimate.com/v1/badges/e8c2dca80074553ba561/maintainability)](https://codeclimate.com/github/rtckit/php-pcap-ffi/maintainability)\n[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\n\n## Pcap Extension\n\nWhenever possible (or if using an older version of PHP), you should use the native [pcap PHP extension](https://github.com/rtckit/php-pcap-ext), this library is provided as an alternative to it for select/edge cases. Otherwise, the FFI based packet capture library is fully compatible with the `pcap` extension. As a result, all changes applied to the extension are reflected here too, and the library version will always match its extension counterpart.\n\n## Requirements\n\nThis library makes use of features introduced as of PHP 7.4, it will not work with obsolete versions. Of course, the [PHP FFI extension](https://www.php.net/manual/en/book.ffi.php) must be installed and enabled.\n\nThe libpcap library must be installed on the target environment; some Linux distributions meddle with the library naming protocols and this can confuse the FFI initialization process. Should that be the case, one can set the `LIBPCAP_NAME` environment variable to the actual library name, or even the absolute path to the library's .so file for custom builds or non-standard directory layouts.\n\nFor example, for Debian Buster, one would set `LIBPCAP_NAME` to `libpcap.so.1.8.1`.\n\n## Install\n\nThe recommended way to install this library is [through Composer](https://getcomposer.org). [New to Composer?](https://getcomposer.org/doc/00-intro.md)\n\nThis will install the latest supported version:\n\n```sh\ncomposer require rtckit/pcap-ffi:^0.6.5\n```\n\n## Tests\n\nBefore running the test suite, make sure the user has the ability to capture network packets (root or `CAP_NET_RAW`).\n\n```sh\nmake test\n```\n\n## License\n\nMIT, see [LICENSE file](LICENSE).\n\n### Acknowledgments\n\n* [libpcap](https://github.com/the-tcpdump-group/libpcap) by The Tcpdump Group, BSD licensed.\n\n### Contributing\n\nBug reports (and small patches) can be submitted via the [issue tracker](https://github.com/rtckit/php-pcap-ffi/issues). Forking the repository and submitting a Pull Request is preferred for substantial patches.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtckit%2Fphp-pcap-ffi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtckit%2Fphp-pcap-ffi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtckit%2Fphp-pcap-ffi/lists"}