Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
how to pass data from php page and display it in apps using MessageBox.show()

C#
private void Track_Click(object sender, RoutedEventArgs e)
        {
            
                HttpWebRequest request =
                    (HttpWebRequest)HttpWebRequest.Create(attackUri);
                request.BeginGetResponse(Showtext, request);

            }

        } 



void Showtext(IAsyncResult result)
        {
            HttpWebRequest request = result.AsyncState as HttpWebRequest;
            if (request != null)
            {
                try
                {





                   WebResponse response = request.EndGetResponse(result);
                   var txt = request.Content.ReadAsStringAsync();
                   MessageBox.Show(txt.Result);
                }
                catch (WebException e)
                {
                   
                }
            }
Posted
Updated 28-Mar-14 18:33pm
v2
Comments
Mohibur Rashid 29-Mar-14 2:25am    
I tell the same thing every other similar question.
You are not taking data from PHP page or PHP script. You are receiving data from HTTP Server. learn to deal with HTTP server.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900