An open API service indexing awesome lists of open source software.

https://github.com/apify/actor-example-php

Example of Apify actor using PHP
https://github.com/apify/actor-example-php

Last synced: 5 months ago
JSON representation

Example of Apify actor using PHP

Awesome Lists containing this project

README

          

This is simple example how to use PHP in Apify. It uses custom Dockerfile based on `php:7.0-cli` image.

## Dockerfile

```Dockerfile
FROM php:7.0-cli

COPY ./* ./

CMD [ "php", "./main.php" ]
```

## main.php

```php
tag contents ...\n";
preg_match_all('/

(.*?)<\/h1>/', $exampleComHtml, $matches);
print "Found: " . $matches[1][0] . "\n";
print "I am done!\n";
```