Skip to content

Commit

Permalink
Update main.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenherczeg committed Jul 27, 2020
1 parent 1dca530 commit 2cb6127
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions main.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
print "ENV vars:\n";
print_r($_ENV);
print "Fetching http://example.com ...\n";
$exampleComHtml = file_get_contents('http://example.com');
var_dump(scandir('/'));
print "Searching for <h1> tag contents ...\n";
preg_match_all('/<h1>(.*?)<\/h1>/', $exampleComHtml, $matches);
print "Found: " . $matches[1][0] . "\n";
$input = file_get_contents('https://api.apify.com/v2/key-value-stores/' . $_ENV['APIFY_DEFAULT_KEY_VALUE_STORE_ID'] . '/records/' . $_ENV['APIFY_INPUT_KEY']);
var_dump($input);

print "I am done!\n";

0 comments on commit 2cb6127

Please sign in to comment.