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
- Host: GitHub
- URL: https://github.com/apify/actor-example-php
- Owner: apify
- Created: 2017-10-25T18:00:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-25T12:33:43.000Z (over 3 years ago)
- Last Synced: 2025-04-11T22:11:25.495Z (12 months ago)
- Language: PHP
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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";
```