Re: Parsing html strings
| From: | Stan Mazo | Date: | Tue, 22 Aug 2000 21:15:23 +0000 |
| Subject: | Re: Parsing html strings | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13029@lists.php.net to get a copy of this message | ||
I don't think fgets is going to do it. I am more interested in what to
do with the map html file once I am able to get it via the snoopy class
or some other method to extract the map. Anybody have other ideas on
how to strip the map out of the the page that maps.yahoo.com or mapquest
returns. I am sure this has been done before.
Thanks,
Stan
"Hans H. Anderson" wrote:
>
> I'm not sure if the join/file method works for remote files, try using
> fgets, it has functionality for support of http://. Something
> like this
> (untested):
>
> $fp =
> fgets("http://maps.yahoo.com/....blah/blah/","r");
> print fread($fp,100000);
> fclose($fp);
>
> On Mon, 21 Aug 2000, Stan Mazo wrote:
>
> > Hey guys,
> >
> > I am trying to extract an a gif image from an html file i get from
> > maps.yahoo.com. So far I have
> >
> > $fcontents = join( '',
> >
> > file('http://maps.yahoo.com/py/maps.py?BFCat=&Pyt=Tmap&newFL=&addr=900+n.michigan+ave.&csz=60611'
> > ) );
> >
> > and then print out $fcontents.
> >
> > Somewhere in there I know I need to parse for the image but being a
> > newbie couldn't really figure out where to go from there. Any
> > suggestions?
> >
> > Thanks in advance,
> >
> > Stan
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
> >
> >
>
> Hans Anderson ~ me@hansanderson.com
> PO Box 426, Missoula, MT 59806 | PHP, Search Engines, SQL
> (800)397-9116 / (406)549-6524 | Databases, Flash Multimedia,
> http://www.hansanderson.com | Killer Audio Production,
> http://www.goofiness.com | Minty Fresh Breath.