openmgraph und hotfix in string
This commit is contained in:
parent
e44c10c5c2
commit
88f87e15b4
15
og.php
Normal file
15
og.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
function scanOG($url) {
|
||||
$og = array();
|
||||
$html = file_get_contents($url);
|
||||
|
||||
$re = '/<meta (name|property)=("|\')(.*?)("|\').*?content=("|\')(.*?)("|\')/m';
|
||||
preg_match_all($re, $html, $matches, PREG_SET_ORDER, 0);
|
||||
|
||||
foreach($matches as $m) {
|
||||
$og[$m[3]] = $m[6];
|
||||
}
|
||||
//print_r($og);
|
||||
return $og;
|
||||
}
|
||||
?>
|
||||
@ -39,7 +39,7 @@ function random($name_laenge) {
|
||||
@mt_srand ( ( double ) microtime () * 1000000 );
|
||||
for($i = 0; $i < $name_laenge; $i ++) {
|
||||
$r = mt_rand ( 0, strlen ( $zeichen ) - 1 );
|
||||
$name_neu .= $zeichen {$r};
|
||||
$name_neu .= $zeichen[$r];
|
||||
}
|
||||
return $name_neu;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user