Paula Shenouda
Paula Shenouda

Reputation: 223

Can i get variable from php to my windows form?

Is it possible to get variable from php page to use it in my windows form?

Upvotes: 2

Views: 851

Answers (2)

Jits
Jits

Reputation: 722

Instead of a variable you can write an xml as an page output and that can be used on windows form using HttpWebRequest and HttpWebResponse classes.

Upvotes: 0

Brian Webster
Brian Webster

Reputation: 30875

Instead of emitting HTML with your .PHP file, emit a single value.

<?php
  echo $MyVar;
?>

Then, with your application, fire off an HTTPRequest to the PHP page. Then, convert the string in the HTTP Response to the data type of the variable.

Upvotes: 3

Related Questions