Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

meta tags and PHP

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

meta tags and PHP

Postby eyewoo » Tue Jun 24, 2003 7:40 am

Are meta tags spidered in PHP files just as they are in HTML files... I would think so, but I don't really have any expertise on the subject :?:
eyewoo
New php-forum User
New php-forum User
 
Posts: 71
Joined: Sun Mar 09, 2003 10:29 am
Location: Pennsylvania, USA

Postby pootergeist » Tue Jun 24, 2003 9:45 am

unless you are specifically blocking spider user agents from running the php files, then they will receive exactly the same output as a browser would

thus, it is perfectly ok to do

echo '<meta type="keywords" content=" .$row['k_words']. '">';

or somesuch
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Postby eyewoo » Tue Jun 24, 2003 9:58 am

That's what I would think.... However, I have a question about your line:

Code: Select all
echo '<meta type="keywords" content=" .$row['k_words']. '">';


If that builds a meta tag on the fly, then I'm thinking a spider wouldn't actually see it since it is PHP code rather than a meta tag... It would appear to be a meta tag once the file were run... but does a spider run a file before it spiders it... I had thought it just spiders what's in place... :?:
eyewoo
New php-forum User
New php-forum User
 
Posts: 71
Joined: Sun Mar 09, 2003 10:29 am
Location: Pennsylvania, USA

Postby pootergeist » Tue Jun 24, 2003 11:35 am

if a spider could just scamper across and read uninterpreted php as php code the language would be dead - everyone would just write spiders to grab everyone elses codes/passwords/tricks.

any http 1.1 request for a .php file (whether from a browser, a spider, a wap phone, a fax machine or indeed another php script) tells Apache to process the php file through the php interpreter and then output whatever code is output (generally html)
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Postby eyewoo » Tue Jun 24, 2003 12:05 pm

OK... That is very good to know... and helps my understanding quite a bit!!! Thanks...
eyewoo
New php-forum User
New php-forum User
 
Posts: 71
Joined: Sun Mar 09, 2003 10:29 am
Location: Pennsylvania, USA


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron