1

I have very basic script that should load html of given website and print out all links it finds in code, its just an example, however I cant get it working and cant figure out why. code:

<?php
$html=file_get_html("http://www.google.com/");
foreach($html->find("a") as $element)
echo $element->href . '<br>';
?>

It returns blank page, $html is just empty I found it might be problem of openssl but I have openssl enabled and its not working anyway. I use apache 2.2.14 on Ubuntu and php 5.3.2-1ubuntu4.18 is version I have currently installed. Any ideas? Thanks.

Sammitch
  • 30,782
  • 7
  • 50
  • 77
Ruli
  • 2,592
  • 12
  • 30
  • 40

0 Answers0