Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

How to Check Is Domain Indexed in Google from Qt application code

$
0
0
Hello All, I am developing an application in which i need to check for any website whether it is Indexed in Google or not. I have written following code on my button click slot.  QNetworkAccessManager manager;    QNetworkReply *reply234;     QEventLoop loop2;       QString googleUrl="http://www.google.com/search?q=site:msn.com";     reply234 =manager.get(QNetworkRequest(QUrl(googleUrl)));    connect(reply234, SIGNAL(finished()), &loop2, SLOT(quit()));    loop2.exec();    QString htmlOutputString= QString::fromUtf8(reply234->readAll());      qDebug()<<"htmlOutputString :"<<htmlOutputString; But I am getting in debugging window most of the time in  htmlOutputString following result. “<HTML><HEAD><meta http-equiv=“content-type” content=“text/html;charset=utf-8”> <TITLE>302 Moved</TITLE></HEAD><BODY> <H1>302 Moved</H1> The document has moved <A HREF=“http://www.google.com/sorry/?continue=http://www.google.com/search?q=site:msn.com”>here</A>. </BODY></HTML> “ And some time blank or just like this “”. Any suggestion appreciated (better if code is included :) ) Thanks in advance Zain

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>