Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QNetworkAccessManager Problem



  • Hello,
    I have xenforo forum and I coded one page in php. This page getting nicknames who entered to forum.
    For example

    When I entering to site on nicknames.php writing my nickname
    Screenshoot
    SS 1

    When I dont entering to site on nicknames.php writing guest.
    Screeshoot
    SS 2

    I getting nicknames with php sessions.

    All is good till here but when I want get this text in QT with QNetworkAccessManager I getting " guest ". I entered site and nicknames.php writing my nickname but QNetworkAccessManager getting this text " guest ". Where is the problem ? How can I fix this ?



  • Please help still I have this problem :(


  • Lifetime Qt Champion

    Hi,

    Please show some patience. Allow at least 24 hours before bumping your own thread. The people answering are doing it on a voluntary basis and might not live in the save time zone as you.

    That said, it's impossible to answer your question. You don't give any detail on the backend, on what query is expected, etc.



  • @SGaist

    hello
    thank you for answer to my thread
    backend nothing I have
    just I have nicknames.php and this php working with session
    if member entering to account on nicknames.php writing them nick
    if dont entering writing " guest "
    I first entering to my account and on nicknames.php writing my nick name all is good
    when my nicknames writing on nicknames.php I want get this text with QNetworkAccessManager
    I getting
    But I got " guest "
    in nicknames.php writing my nick name but when I getting this text with QNetworkAccessManager writing " guest ".


  • Lifetime Qt Champion

    How are you doing your requests with QNetworkAccessManager ?



  • @SGaist

    I do like this.

    QString newsurlgiris = "https://siteurl/nicknames.php";
    
         QNetworkAccessManager LManager33;
         QNetworkReply* reply33 = LManager33.get(QNetworkRequest(QUrl(newsurlgiris)));
         QEventLoop event33;
         connect(reply33, SIGNAL(finished()), &event33, SLOT(quit()));
         event33.exec();
    
         QString newsurl = reply33->readAll();
    
         qDebug() << "---->" << newsurl;
    

  • Lifetime Qt Champion

    From the looks of it, you didn't login using QNetworkAccessManager.


Log in to reply