hi all, regarding the get_meta_tags function in php,
1. Can you get meta-tags from "http://blahblah.com" instead of from pages in your own site?
2. Can you just put "http://www.blahblah.com" or do you have to specify the entire path "http://www.blahblah.com/blah.html"
3. Does the "/" at the end of a path affect it?
I've checked the php.net manual but it doesnt say, so thank you for your help...
no one knows?
i've tried to test out it out but i keep getting mixed results, and i don't know whats affecting what...
What exactly is your error, I do it all the time on remote sites just like this
$array = get_meta_tags("http://www.somedomain.com");
Those are the only two things it returns, and I imagine the function would fail if at least one of those was not present on the page you are trying to grab them from.
I've tried this:
$metatags = get_meta_tags("http://www.phpbuilder.com/", 1);
but all i get is this: (when i view source)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
I've even tried without the "/" behind, without the ",1"
even without "http://", but i keep getting the same results and a blank page. Can someone please help me?
What version of php are you running, I used your exact code and it gave me the keywords from the phpbuilder site? Again what error are you getting?
Thanks so much for helping...
i'm using Omni Httpd - with php 4.0.1pl2
my error is that i get a blank page...
Could it be because i'm using Omni?
I just sent you a script at your email listed in your profile. It will tell you whether the function is available although I would think that you would get a function does not exist error if it didn't. You are able to run other php scripts right??
i uploaded it to my website, and it works perfectly.
i guess Omni httpd is screwy.. Are you using omni or apache?
I use Apache for Windows, although I can't imagine that the web server would be the problem? I know this may seem like a stupid question(so please don't take offense), but you are connected to the internet when you try and run this function right?
it might not be the server, it might be a setting somewhere... I'll just go get apache and try it out.