processa l'output di curl come un DOMDocument cosi poi è più semplice recuperare i dati...

Codice PHP:
$dom DOMDocument::loadHtml$output );