It is possible.
The following C# code can be compiled for a file .exe
, and does: forever (1), wait sixty seconds (2), make a request on a PHP page (3) and take what the page print to process (4).
public static void Main( string[] args )
{
int dados = 0;
while ( true ) // 1
{
System.Threading.Thread.Sleep( TimeSpan.FromSeconds( 60 ) ); // 2
dados++;
using ( var client = new System.Net.WebClient() )
{
var retorno = client.DownloadString( "http://servidor.url/pagina.php?dado=" + dados ); // 3
Console.WriteLine( retorno ); // 4
}
}
}
You need to download a C# programming IDE or its equivalent in another language.
It is also possible to do an . exe of a PHP, but it is not such a common solution.
Yes, but take into account the time delay in communication (internet), it may be that this "real time", is not so real ... heheheh. Depending on the language or tool you use to generate ". exe" it is even quite simple to send a request to a PHP server. However, in PHP, the simplest way (maybe the only way, I don’t know...) is to put this value in the database, and make the other "connections" constantly check for this change. Which would probably cause more delay.
– mau humor
doubt is about how to make such a program . exe or is it about php?
– Daniel Omine
That’s basically what usel5978 is saying.
– Gonçalo
It’s about PHP and exe
– Gonçalo