PHP SDK Integration
As PHP is a single-threaded environment, you cannot use a queue in a separate thread or a connection pool to flush messages. Instead, you can specify different consumers to make requests to RudderStack servers. The lib-curl consumer is preferable for low-volume sources, and the fork-curl consumer should work best for cases where you can't use persistent sockets. You can use both of these for faster response times under light loads. However, the lib-curl consumer is RudderStack's default PHP library.
Frequently Asked Questions
What does the RudderStack PHP SDK do?
The open-source RudderStack PHP SDK lets you record customer event data from your PHP code. After this, you can route your customer data to any analytics service you enable on your destination page.
How do you send events from RudderStack using the PHP SDK?
You need to install RudderStack PHP SDK using composer and initialize the RudderStack Client. Once you initialize the RudderStack client, you can send relevant customer events from the RudderStack client.
Use the PHP SDK integration with popular destinations
About PHP SDK
RudderStack’s open-source PHP SDK allows you to track and capture event data from your PHP code. Once enabled, the event requests will flow through RudderStack to a wide range of everyday, popular marketing, sales, and product tools.