Re: Regarding split text and match from data base [message #183856 is a reply to message #183854] |
Fri, 22 November 2013 15:54 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 11/22/2013 10:34 AM, Arno Welzel wrote:
> 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,
Have you actually looked at the output of arp -a? From your response, I
don't think so.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|