$string Handling - Extreme Nubie

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aapwlb
Forum Newbie
Posts: 2
Joined: Thu Oct 02, 2008 1:38 pm

$string Handling - Extreme Nubie

Post 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
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: $string Handling - Extreme Nubie

Post by VladSun »

?!?
Is it PHP or JavaScript?!?
There are 10 types of people in this world, those who understand binary and those who don't
aapwlb
Forum Newbie
Posts: 2
Joined: Thu Oct 02, 2008 1:38 pm

Re: $string Handling - Extreme Nubie

Post 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)
Post Reply