Reply to Re: Pulling Title Tag out of HTML

Your name:

Reply:


Posted by Jerry Stuckle on 03/02/07 12:43

affiliateian@gmail.com wrote:
> ok, running this now:
>
> <?php
> $filename=__FILE__;
> $content = implode('', file($filename));
> preg_match("/<title>(.*)<\/title>/i", $content, $match);
> $title = $match[1];
> $link='http://www.stumbleupon.com/submit?url='.
> $_SERVER['SCRIPT_URI'].'&amp;title='.urlencode($title);
> ?>
>
> <a href='<?php echo $link;?>'> Link to stumbleupon</a>
>
>
> Unfortunately, I think because we are running the php in an include
> file, the echo link is not working. Viewing the php file directly
> works but when this piece of code is placed in a php file inside
> a .shtml file, it no longer echos the url or title.
>
> Any ideas of how we can get around this?
>

If your server is properly configured it should make no difference if
it's in an include file or not. The PHP processor should interpret any
..php file, whether called directly or included in another file.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация