Pogledajte određenu poruku
Staro 22. 08. 2011.   #4
webarto
expert
Grand Master
 
Avatar webarto
 
Datum učlanjenja: 11.04.2010
Poruke: 998
Hvala: 141
959 "Hvala" u 153 poruka
webarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished road
Default

Opet mislim da ćeš ovako najprije ubosti sa RegEx...

PHP kôd:
$html '<head>
<meta name="description" content="Free Web tutorials" />
<meta name="keywords" content="HTML,CSS,XML,JavaScript" />
<meta name="author" content="Hege Refsnes" />
<meta http-equiv="refresh" content="0; url=http://example.com/">
</head>'
;

preg_match('#url.*?=.*?([^"\>\s]+)#is'$html$matches);

echo 
$matches[1]; 
@Dinke, fali ti case insensitive i single/multi line modifier, neki siteovi stavljaju META velikim itd...
__________________
Github // LinkedIn // PHP // ZCE // Stackoverflow PHP // Site5 Web Hosting

Poslednja izmena od webarto : 22. 08. 2011. u 14:47.
webarto je offline   Odgovorite uz citat
"Hvala" webarto za poruku: