Hi jskarr1982,
I'm working on a website which is very similar with you. I just need the silver spot price but i cant seem to get the codes correct. Anyone can help me out abit here ? im losing hair fast >.<
<?php
$file = file_get_contents("http://www.apmex.com/Category/503/Silver.aspx");
$do = preg_match('/<span id="ctl10_ctl00_MetalInfo1_lblAsk">(.*)<\/span>/', $file, $matches);
if ($do) {
$no_dollar = $matches;
$dollar = $no_dollar['1'];
echo $dollar;
} else {
echo "No Price";
}
?>
<?php echo $dollar; ?>
I'm get No Price output but i had double check the span id and the url and the source code...its all correct =(
Thanks,
Victor