---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.ru/dev/direct/doc/en/php5-json-curl.md
  - https://yandex.ru/dev/direct/doc/ru/php5-json-curl.md
  - href: en/php5-json-curl.md
    type: text/markdown
    title: Markdown version
  - href: llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/examples/php5-json-curl.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/direct/doc/en/llms.txt

# PHP examples for JSON

PHP 5 using JSON with the cURL library

- [Get campaigns](https://yandex.ru/dev/direct/doc/en/php5-curl-campaigns.md)
- [Create ads](https://yandex.ru/dev/direct/doc/en/php5-curl-ads.md)
- [Get statistics for any dates](https://yandex.ru/dev/direct/doc/en/php5-curl-stat1.md)
- [Get statistics for a selection of rows](https://yandex.ru/dev/direct/doc/en/php5-curl-stat2.md)

## Verify the SSL certificate{#php-ssl}

When using the SSL protocol with PHP prior to version 5.6.0, verification of the remote server's SSL certificate might be disabled by default, which may lead to man-in-the-middle attacks. If verification is enabled, you may need to specify the path to the certification authority's root certificate.

We recommend enabling verification and, if necessary, setting the path to the CA root certificate file on the local computer.

The Yandex Direct API servers use an SSL certificate issued by the CERTUM certification authority. You can download the root certificate from the CA's website: [https://www.certum.eu/certum/cert,expertise_root_certificates.xml#CCA](https://www.certum.eu/certum/cert,expertise_root_certificates.xml#CCA). Go to the section **Certum root certificates** and click the link **Download: PEM** (for the `CA.pem` file).

Each example includes a section with instructions on enabling SSL certificate verification and setting the path to the root certificate.

