Jan 16th, 2004, 05:37 PM
#1
Thread Starter
Hyperactive Member
Please help me retrieving data from a PHP file!!???[Resolved]
Last edited by raladin; Mar 29th, 2014 at 10:52 PM .
Jan 16th, 2004, 06:29 PM
#2
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:
Public Function parse(str As String, dil)
str = split(str, dil)
parse = str(1)
End Sub
'and then you can use it like this:
Private Sub Form_Load()
parse(file_contents, "<marker1>")
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..
Jan 16th, 2004, 11:48 PM
#3
Thread Starter
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:52 PM .
Jan 16th, 2004, 11:55 PM
#4
Thread Starter
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:52 PM .
Jan 17th, 2004, 04:01 AM
#5
here..
i'll try to get a better working version tomorrow, so this is pretty much the bare minimals..
Attached Files
Jan 17th, 2004, 04:05 AM
#6
Thread Starter
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:52 PM .
Jan 17th, 2004, 04:39 AM
#7
Thread Starter
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:53 PM .
Jan 17th, 2004, 04:43 AM
#8
Thread Starter
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:53 PM .
Jan 17th, 2004, 12:54 PM
#9
Stuck in the 80s
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.
Jan 17th, 2004, 01:08 PM
#10
Thread Starter
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:53 PM .
Jan 17th, 2004, 01:25 PM
#11
Stuck in the 80s
Originally posted by raladin
Resolved..
So mark the subject as such.
Jan 17th, 2004, 01:40 PM
#12
Thread Starter
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:53 PM .
Jan 17th, 2004, 03:09 PM
#13
Stuck in the 80s
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.
Jan 17th, 2004, 03:42 PM
#14
Thread Starter
Hyperactive Member
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
Forum Rules
Click Here to Expand Forum to Full Width