Tell me in what ways you can organize a connection between the desktop application (client) and php. For example.

I have an index.php script:

<?php echo 'Text ot servera'; ?> 

I need a desktop application to access the index.php page and get the string Text ot servera. How to transfer data in json or xml?

  • four
    @Asen, I'm sorry, I did not restrain myself, but it just infuriates me with such absolutely dismissive, empty comments and answers. If you know what to read - give a specific link or sample Google request. - Somebody got right on you right here. - avp
  • 3
    @Asen comments are gone. Apparently because of the ban. @ HashCode, so it was conceived in the draft forum? - avp
  • four
    @avp he deleted everything himself And looks cute face yes? ! [alt text] [1] [1]: - Artem
  • 2
    Class !!!! - avp
  • 3
    Yes, no, @Asen really helped to solve problems, even though he occasionally carried a heresy, but the help from him was substantial, IMHO) - Free_man

2 answers 2

Agree with @avp

Read the book before you climb to where it is not clear. In any textbook, a similar problem is considered.

Many have already written that either pass this question past, or at least give a link to the topic where you can read.

And on the issue. Well, firstly, where is php lying around? on the server with an apache? if so, you can access the page at its address http: //localhost/somepage.php and get an answer to the screen Text ot servera

Text ot servera. How to transfer data in json or xml?

Transfer data in which direction? To the server or from the server?

If to the server, then either GET or POST. Get the data, again, depending on what and how to give it to you. Just show, or show in a certain format, or give them away.

Actually, I advise you to correct the question for the better, more constructive!

  • 2
    These were the words of the banned @Asen: Read the books before you can not understand where. In any textbook, a similar problem is considered. - Free_man

Look in this direction, it will be easier