FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Regarding split text and match from data base
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Regarding split text and match from data base [message #183854 is a reply to message #183843] Fri, 22 November 2013 15:34 Go to previous messageGo to previous message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma:
Senior Member
Am 22.11.2013 12:28, schrieb jalaf28(at)gmail(dot)com:

> Hello All I just start learning PHP and i am using 5.4.16 i just
> want to split the out put of the following and match from the
> database and print the System name.
>
> here is the Code
>
> <?php
>
> ob_start(); $line=shell_exec("arp -a"); echo "<pre>; echo $line; echo
> "</pre>";
>
> ?>
>
> It shows the output of the command "arp -a" and show the Ip address
> and Mac address on the LAN system. i saved the name and the Mac
> address in the database. now i want to extaxct the command output and
> match ["MAc address] with database and show the Particular system
> name and Ip Address. i try google but not sufficent.

You can try explode() using space (' ') as delimiter, see:

<http://php.net/manual/en/function.explode.php>



--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: creating key / hash
Next Topic: from mysql in associative array
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 05:31:55 GMT 2024

Total time taken to generate the page: 0.03889 seconds