Results 1 to 4 of 4

Thread: [RESOLVED] Get Value from a script

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    526

    Resolved [RESOLVED] Get Value from a script

    Hello Everyone,

    I have written a standard winforms application in visual basic .net 2008. I wanted to implement one thing.

    I want the application to call a PHP script and get a value from that. Basically I want to check for current date online. I have a webserver whereby I can run php/perl scripts.

    Is there any way my application can call that script and that script returns date. If this works then the script may return other values if possible, but thats for later.

    Help will be appreciated.

    Thanks a lot,

    Gr

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Get Value from a script

    You can use a WebClient to access the contents of a URL. WebClient.DownloadString will return a String containing the text returned from a URL, be that a static HTML page, a PHP script or something else.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    526

    Re: Get Value from a script

    Thanks a lot buddy. Using webclient I was able to get contents of url. Cheers.

  4. #4
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [RESOLVED] Get Value from a script

    Or you can create a webservice to run on the web server and have your application consume the service.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width