here is my code with problems:
$url = 'somesite/somepage';
$str = file_get_contents($url);
preg_match('/\w(\d*).*?\$/',$str,$matches);
print_r($matches[0]);
the goal is to type in any webpage and get its source code into
$str and then find the first appearance of the symbol $ in the string
and return only the number closest to that symbol
1.is there something like screenscrape that not gives me the pictures and layout , just the source code so I can put it in a string like text ?
2.when I replace the "$str = file ..." with
"$str = 'hgfghfgh 7656575 ghfghf 160 $ hfgcgh 340 $ gffg$'"
I get all the text before the $ but I want only the nomber before the first $ returned and thats it. how should the preg_match be written?