Results 1 to 14 of 14

Thread: Please help me retrieving data from a PHP file!!???[Resolved]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509

    Question Please help me retrieving data from a PHP file!!???[Resolved]

    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:52 PM.

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    That isn't really a PHP question.. it's more of a VB question since you can't do anything to give VB the value you want. I suggest you ask it in the VB section... You're going to want to do a request for the page and read it in, parse it to get exactly what you want, and display it somewhere. I advise that you put unique markers in the PHP file around the values you want to, so that you can easily parse the file in VB and get the value you want..

    IE:

    PHP Code:
    <?
      $var = "test";
      echo "<marker1>" . $var . "<marker1>";
    ?>
    Assuming that you're looking for the value between two '<marker1>'s, you can then use VB to split the file apart and get the value of $var..

    VB Code:
    1. Public Function parse(str As String, dil)
    2.   str = split(str, dil)
    3.   parse = str(1)
    4. End Sub
    5.  
    6. 'and then you can use it like this:
    7.  
    8. Private Sub Form_Load()
    9.   parse(file_contents, "<marker1>")
    10. End Sub

    I use <marker1> just to show that you can use multiple dilimeters to get multiple values.. I don't think I'd literally use <marker1> though..
    Like Archer? Check out some Sterling Archer quotes.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:52 PM.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:52 PM.

  5. #5
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    here..

    i'll try to get a better working version tomorrow, so this is pretty much the bare minimals..
    Attached Files Attached Files
    Like Archer? Check out some Sterling Archer quotes.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:52 PM.

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:53 PM.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:53 PM.

  9. #9
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    A search of the forums could have found you an answer faster than posting this question again. Getting data from a file on a server is a commonly asked question in the VB section.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:53 PM.

  11. #11
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by raladin
    Resolved..
    So mark the subject as such.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:53 PM.

  13. #13
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Uh...

    Read the lessons on MySQL in the PHP book. Learn the functions mysql_connect(), mysql_select_db(), and mysql_query().

    The read the MySQL book, particularly the SELECT * FROM and INSERT INTO syntax.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:53 PM.

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