Page 1 of 1

$string Handling - Extreme Nubie

Posted: Thu Oct 02, 2008 1:57 pm
by aapwlb
Hello all, forgive me if I don't ask this question correctly. I have been racking my brain trying to figure this out.

I have been able to parse an xml download and put each url string in a variable simply called $url.
It look like this:

$urls = $chart->getElementsByTagName( "url" );
$url = $urls->item(0)->nodeValue;

Each one prints out fine as text. Here is an example.
echo "$url <br>";

http://www.zillow.com/app?chartType=aff ... vice=chart

I can't seem to figure out how to take each string url and call the website to return the small graph.
Any input would be greatly appreciated.

Thanks
Alan :D

Re: $string Handling - Extreme Nubie

Posted: Thu Oct 02, 2008 2:47 pm
by VladSun
?!?
Is it PHP or JavaScript?!?

Re: $string Handling - Extreme Nubie

Posted: Thu Oct 02, 2008 3:27 pm
by aapwlb
Yes, it's PHP. When I echo them out each xml is a text url minus the parenthesis. I can of course cut and paste them in a broswer and they will return the small graph. I have tried using fopen such as this:
$filehandle =

fopen("$url" .
$_GET["$url"], "r");
while (!feof($filehandle)){
$download = fgets($filehandle);
echo $download;
}
Which unfortunately generates a bunch of gobbleygoo. I thought that I could pass each url string and open it up grab the small graph and echo it out.


(http://www.zillow.com/app?chartType=aff ... vice=chart)

(http://www.zillow.com/app?chartType=aff ... vice=chart)