ø Don’t waste your time reading this blog ø

How credit card really works

Filed under: business — Tags: — taewoo @ 11:25 pm June 28, 2009

credit card hell

[Post to Twitter] Tweet This Post 

How to search for html TITLE tag with PHP

Filed under: web 2.0 — Tags: — taewoo @ 12:24 pm June 27, 2009

I know this is probably a lame post, but i’ll do it anyway.

If you want to search for HTML title, you’ll notice everyone gives out an answer like this:

$matches = array();
$pattern = ‘/<title>(.*)<\/title>/’;
preg_match($pattern, $html, $matches);

$pagetitle = $matches[1];

But this actually doesn’t work in cases where there’s extra newline character. (.*) Doesn’t match new lines, which probably causes the problem. This means that it matches

<title> title </title>

but doesn’t match

<title> title
</title>

Instead, do this:

preg_match(”/<title>([^<]*)<\/title>/i”, $html_text, $title);

[Post to Twitter] Tweet This Post 

Deutsche Bank’s report on housing outlook

Filed under: business, real estate — taewoo @ 12:16 pm June 25, 2009

Yes, very friggin’ grim. Good for bottom feeding leeches like me, though.

[Post to Twitter] Tweet This Post 

Older Posts »