# Simple PHP curl script to help you learn ES

**URL:** <https://discuss.elastic.co/t/simple-php-curl-script-to-help-you-learn-es/6880>\
**Category:** Elasticsearch\
**Created:** [March 4, 2012, 3:44pm UTC](https://discuss.elastic.co/t/simple-php-curl-script-to-help-you-learn-es/6880 "2012-03-04T15:44:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stratawing](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@stratawing](https://discuss.elastic.co/u/stratawing)\
**Post date:** [March 4, 2012, 3:44pm UTC](https://discuss.elastic.co/t/simple-php-curl-script-to-help-you-learn-es/6880/1 "2012-03-04T15:44:46Z")

</div>

If your lang is PHP, and you're just getting started with ES and want  
to test some of its features using the CURLs that are shown on the  
website (typically in json), here's a _VERY_ simple PHP curl script to  
help you get started.

[https://gist.github.com/1973574](https://gist.github.com/1973574)

Note that there are some pretty slick PHP clients out there (see  
[http://www.elasticsearch.org/guide/appendix/clients.html](http://www.elasticsearch.org/guide/appendix/clients.html)) that I  
highly recommend, but this short script may reduce your learning curve  
a bit if you're just doing some initial exploration.

If the experts in the ES group have any suggestions on this script,  
feel free to pass them along.

Cheers!

---

<div class="post-metadata">

**Author:** ![stratawing](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@stratawing](https://discuss.elastic.co/u/stratawing)\
**Post date:** [March 4, 2012, 4:18pm UTC](https://discuss.elastic.co/t/simple-php-curl-script-to-help-you-learn-es/6880/2 "2012-03-04T16:18:10Z")

</div>

Whoops -- something happened to my gist.... Try this one:

> <https://gist.github.com/stratawing/1973719>

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 5, 2012, 3:08pm UTC](https://discuss.elastic.co/t/simple-php-curl-script-to-help-you-learn-es/6880/3 "2012-03-05T15:08:43Z")

</div>

Thanks for sharing!

On Sunday, March 4, 2012 at 6:18 PM, stratawing wrote:

> Whoops -- something happened to my gist.... Try this one:
> 
> [ES Beginner's PHP Script · GitHub](https://gist.github.com/1973719)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:37am UTC](https://discuss.elastic.co/t/simple-php-curl-script-to-help-you-learn-es/6880/4 "2017-07-06T03:37:21Z")

</div>


