|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Php get meta tags help
Code:
<?php
$tags = get_meta_tags('http://www.realgm.com/');
echo $tags['keywords'];
echo $tags['description'];
?>
i just used any website.. i can't get the meta tags though... what am i doing wrong? i get these error messages.. Warning: get_meta_tags() [function.get-meta-tags]: URL file-access is disabled in the server configuration in /home/ustackc1/public_html/menu.php on line 78 Warning: get_meta_tags(http://www.realgm.com/) [function.get-meta-tags]: failed to open stream: no suitable wrapper could be found in /home/ustackc1/public_html/menu.php on line 78 if its something to do with my host, what is another easy way to do this? |
|
#2
|
|||
|
|||
|
I haven't used this myself but it simply sounds like the get_meta_tag function is not enabled by your web host.
__________________
- Richie |
|
#3
|
|||
|
|||
|
thx.. is there another way to get meta tags then?.. i been stuck on this for like a week lol
|
|
#4
|
|||
|
|||
|
I remember reading something you posted about something sort of similar.
*finds your post* You could even try something like this: http://forums.codewalkers.com/php-coding-7/webcrawler-help-951296.html Although everyone has different ways of writing meta tags... Ask your host about the error you had... they might be able to enable or resolve your remote file access/meta tag problem quite easily... But then again most hosts can be annoying |
|
#5
|
|||
|
|||
|
it does have something to do with your host. you host has url file access set to off. it just means that any function that needs to read a file such as fopen or file_get_contents only work locally and not on urls. You can try other functions like file_get_contents if you want to on a url. if that works then you could probably read the string in and either parse it yourself to get the meta tags or save it to a file temporarily then read the meta tags.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Php get meta tags help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|