I am trying to fetch data from example.com using file_get_contents and preg_match_all but not getting the desired result.
The url is example.com data to be fetched in this url is abc="hello" - i want to fetch hello and store inside a variable so far i have
$url = "example.com";
$pagecontent = file_get_contents($url);
preg_match_all('/abc="([^"]+)"/',$pagecontent ,$m);
print_r($m);
The result I am getting is
Array ( [0] => Array ( ) [1] => Array ( ) )
When the result should be hello
.