$ch = curl_init('site');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/6.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'x.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'x.txt');
$html = curl_exec($ch);
$dom = new DOMDocument();
@$dom->loadHTML($html);
$link = array();
foreach($dom->getElementsByTagName('a') as $link) {
# Mostrar todos os elemento que estiver dentro da tag href
$x = $link->getAttribute('href'); // exibi todos os conteudo dentro do href !
// pegar apenas o link completo
#https://www.site.com/checkout.asp?ref=fvFDGND2MYQ
///
echo $x;
So that way I can get all the html links received from cURL
and for me just get the link ? just this link?