I want to make a if
to compare URLs, tried using parse_url
... but I'm not sure how to use it. Could someone help me?
<?php
$url1 = parse_url ( "http://enquetegoias.esy.es" );
$url2 = parse_url ( "http://enquetegoias.esy.es/pesquisa.html" );
?>
<?php if ($url1['host'] == $url2['host'] ): ?>
<meta property="og:image" content="http://enquetegoias.esy.es/img/logo.jpg" />
<meta itemprop="image" content="http://enquetegoias.esy.es/img/logo.jpg" />
<?php else: ?>
<meta property="og:image" content="http://enquetegoias.esy.es/img/votacao.jpg" />
<meta itemprop="image" content="<?=URL?>img/layout/votacao.jpg" />
<?php endif ?>