Re: don't work

From: Date: Fri, 10 Nov 2000 12:35:44 +0000
Subject: Re: don't work
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-24649@lists.php.net to get a copy of this message
Juan carlos wrote: > > /home/http/webpages/mywebpage.html > <META NAME="titulo" CONTENT="La armonización Anatema?"> > <META NAME="autor" CONTENT="Sara"> > <META NAME="fecha" CONTENT="Mayo 2000"> > > $meta_tags=get_meta_tags("/home/http/webpages/mywebpage.html",[0|1]); > > count($meta_tags) --> 1 > > $meta_tags["autor"]; --> "" Try this: <?php $meta_tags=get_meta_tags("/home/http/webpages/mywebpage.html"); echo count($meta_tags); echo $meta_tags["autor"]; ?> Since you qualify your path you don't need to supply andy second argument. I assume that you meant the line to read either: $meta_tags=get_meta_tags("/home/http/webpages/mywebpage.html",1); or $meta_tags=get_meta_tags("/home/http/webpages/mywebpage.html",0); and that you didn't use the code as you sent it to the list. Keep in mind that you need to supply the author, date and title fields in english if you want this to work with international search engines. (I'm not even sure if you are alloweed to translate the meta headers to Spanish (or other languages)). Also note that the date field should use a special format for the dates, Tue, 20 Aug 1996 14:25:27 GMT is an example of how this should look. Check out http://www.w3.org/TR/html4/struct/global.html#h-7.4.4 for info on meta tags in HTML 4.0. -- Paul K Egell-Johnsen Utvikler/PR Manager eZ systems as http://zez.org/ - about: code

« previous php.general (#24649) next »