Sign in to follow this  
Followers 0
the_riddler

Get Information from PHP Site

2 posts in this topic

Hi all,

I have a problem and I hope you can help me with that.

I have a php site with the following information:

room=roomname;mac=macaddress;name=beamername

I need to get that information of the room to connect the beamer in that room via wlan.

That should be done by a autoit script

 

I tested the function _INetGetSource() but the problem is, that I get all the html code thru this function.

Is there any possibility to get only the string "room=roomname;mac=macaddress;name=beamername" that lies in the <body>?

If I have the string I would like to separate it into the single informations.

 

THANKS FOR YOUR HELP

Share this post


Link to post
Share on other sites



Something like this should do the trick

#Include <Array.au3>
$html = BinaryToString(InetRead("your_url"))
$infos = StringRegExp($html, '(?:room|mac|name)=(\w+)', 3)
_ArrayDisplay($infos)

But the regex can fail because you didn't provide enough informations about the exact html content

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0