Skip to content

Commit 84ef816

Browse files
authored
Merge pull request #7975 from slashequip/patch-1
Update outdated packages
2 parents db92b9c + 27c2ce7 commit 84ef816

File tree

1 file changed

+8
-10
lines changed
  • src/connections/sources/catalog/libraries/server/php

1 file changed

+8
-10
lines changed

src/connections/sources/catalog/libraries/server/php/index.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PHP is a little different than Segment's other server-side libraries because it
1212

1313
Want to stay updated on releases? Subscribe to the [release feed](https://github.com/segmentio/analytics-php/releases.atom).
1414

15-
## Getting Started
15+
## Getting started
1616

1717
Clone the repository from GitHub into your desired application directory.
1818

@@ -318,7 +318,7 @@ Segment::track(array(
318318

319319
For more details about Alias including the **Alias call payload**, check out the [Segment Spec](/docs/connections/spec/alias/).
320320

321-
## Historical Import
321+
## Historical import
322322

323323
You can import historical data by adding the `timestamp` argument to any of your method calls. This can be helpful if you've just switched to Segment.
324324

@@ -402,7 +402,7 @@ Segment::init("YOUR_WRITE_KEY", array(
402402
</tr>
403403
</table>
404404

405-
### Lib-Curl Consumer
405+
### Lib-Curl consumer
406406

407407
The [lib-curl consumer](https://github.com/segmentio/analytics-php/blob/master/lib/Segment/Consumer/LibCurl.php) is a reliable option for low-volume sources or if you want fast response times under light loads. The library runs synchronously, queuing calls and sending them in batches to Segment's servers. By default, this happens every 100 calls, or at the end of serving the page. By default, Segment ignores http responses to optimize the library's speed, but you can choose to wait for these responses by enabling debug mode.
408408

@@ -425,7 +425,7 @@ Segment::init("YOUR_WRITE_KEY", array(
425425
```
426426

427427

428-
### Fork-Curl Consumer
428+
### Fork-Curl consumer
429429

430430
The [fork-curl consumer](https://github.com/segmentio/analytics-php/blob/master/lib/Segment/Consumer/ForkCurl.php) should work best for cases where you can't use persistent sockets, or want to ensure quick response times under light load. It works by creating an in-memory queue which buffers track and identify calls. The queue is flushed by forking an async `curl` process that sends a batch request. By default, this happens every `100` calls, or at the end of serving the page. This consumer will spawn a separate process for each request which tracks events. If your servers are handling more than 20 requests per second, you may want to look at the [file consumer](#file-consumer).
431431

@@ -452,7 +452,7 @@ Segment::init("YOUR_WRITE_KEY", array(
452452
</table>
453453

454454

455-
### Socket Consumer
455+
### Socket consumer
456456

457457
If you can't spawn other processes from your PHP scripts, you can use the [socket consumer](https://github.com/segmentio/analytics-php/blob/master/lib/Segment/Consumer/Socket.php), which will allow you to make requests to Segment. Each time a track or identify call is made, it will initiate a socket request to Segment's servers. The socket request is about as async as you can get with PHP, where the request will write the event data and close the connection before waiting for a response. However, if your servers are dealing with more than 100s of requests per second or cannot use a persistent connection, you may want to use one of the other consumers instead.
458458

@@ -483,7 +483,7 @@ Segment::init("YOUR_WRITE_KEY", array(
483483
</table>
484484

485485

486-
### File Consumer
486+
### File consumer
487487

488488
The [file consumer](https://github.com/segmentio/analytics-php/blob/master/lib/Segment/Consumer/File.php) is a more performant method for making requests to Segment. Each time a track or identify call is made, it will record that call to a log file. The log file is then uploaded "out of band" by running the `file.php` file found in [the analytics-php repository](https://github.com/segmentio/analytics-php/blob/master/lib/Segment/Consumer/File.php).
489489

@@ -526,8 +526,6 @@ $ sudo service cron reload # reload the cron daemon
526526
{% include content/server-side-troubleshooting.md %}
527527

528528

529-
## 3rd-Party Libraries
529+
## 3rd party libraries
530530

531-
If you only need support for PHP5, the team at Underground Elephant has released a [3rd-party library](https://github.com/uecode/segment-io-php) based on Guzzle.
532-
533-
Alt Three Segment is a Segment bridge for Laravel. The GitHub repo can be found here: [AltThree/Segment](https://github.com/AltThree/Segment){:target="_blank”}.
531+
Laravel Segment is a Segment SDK for Laravel. View the [slashEquip/laravel-segment](https://github.com/slashequip/laravel-segment){:target="_blank”} GitHub repo to learn more.

0 commit comments

Comments
 (0)