PHP script not workin on dream host servers.. HELP

Ok i am running a phpscript that fetches the info from finance but i cant get it to work

the code is

<?php $fd = fopen ("", "r"); $contents = fread ($fd, 200); fclose ($fd); $contents = str_replace ("\"", "", $contents); $contents = explode (",", $contents); echo "

Apple stock tracker

Most recent trade: \$$contents[1]

Today's Change: $contents[4]

(Prices delayed up to 20 minutes.)

"; ?>

Any help is appreciated.

I believe fopen is disabled.(?)

What wiki says about allow_url_fopen

Yup yup.

fopen isn’t disabled. However, allow_url_fopen is, which means you can use fopen(), but you cannot supply a URL of any type for opening.

In other words, use [url=]these steps in the wiki.
I recommend changing the
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 1);
line to 5-10 because otherwise, it’ll time out after 1 second, which isn’t good for accessing other web pages.

I totally agree. I’ve changed that script slightly to reflect your suggestion.

Simon Jessey
Keystone Websites | si-blog

thanks I will try it out tonight. Hopefully it will work. Thanks!!