admin



Uma ótima função para verificar a existência de Url no php é a função CURL. Segue exemplo de utilização: [php] function VerificaUrl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); // don’t download content curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); if(curl_exec($ch)!==FALSE) { return true; } else { return false; […]

Verificar existência de URL ou Link com PHP


O Comando Year possibilita que você filtre os registros por anos em uma consulta SQL. Ex: SELECT year(data) as anoVenda, SUM(venda.total) AS total    FROM venda WHERE year(data)=year(Now())  GROUP BY data Este comando filtrará todos os registro com data igual ao ano atual do servidor

Selecionar registro por ano vigente em SQL – SQL