from Google Ranking by Luigi Rosa
Check the ranking of a web page in Google

[out,stopsearch]=trovastringa(html,stringa)
function [out,stopsearch]=trovastringa(html,stringa)
out = 0;
stopsearch = 0;
ris = strfind(html,'<p class=g>');
if length(ris)==0
    stopsearch = 1;
    return;
end
numero = length(ris);


for ii=1:numero
    pos0 = ris(ii);
    pos1 = length(html);
    sottostringa   = html(pos0:pos1);
    posizioniapici = strfind(sottostringa,'href');
    sottostringa   = sottostringa(posizioniapici(1):end);
    posizioniapici = strfind(sottostringa,'"');
    pos0 = posizioniapici(1);
    pos1 = posizioniapici(2);
    url = sottostringa(pos0:pos1);
    if length(strfind(url,stringa))>=1
        out = ii;
        return;
    end
end

Contact us at files@mathworks.com