Finally got something working:
$filename = "http://www.url.com/script.cgi?p_id=100";
$output = file_get_contents($filename);
$output=trim(strip_tags(substr($output,strpos($output,'$'))),' $');
echo floatval($output)." / €".round($output*$euro,2);
I had to use the floatval of $output because without that $output included about 4 carriage returns and a space after it. Does anybody know why the carriage returns are attaching themselves on there?
Is there a way to NOT have to include the complete URL in the code? This would be better since there are multiple domain names for the site I am working on.
Which actually executes faster? To include all the expressions on one line or to break the output expression down into multiple lines like this:
$output=strip_tags($output);
$output=trim(strstr($output,'$'),' $');
One other question, does anyone know a URL where I can get a current value for $euro? I am figuring there has to be a URL out there somewhere where you call it and it gives you today's exchange rate between the dollar and the euro.
Edit/Delete Message