How to capture local lan ip in php

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

arvnd86
New php-forum User
New php-forum User
Posts: 3
Joined: Mon May 06, 2013 11:50 pm

How to capture local lan ip in php

Postby arvnd86 » Mon May 06, 2013 11:55 pm

Hi to all,

How to fetch local lan ip address in php..?

User avatar
sandeep605085
New php-forum User
New php-forum User
Posts: 44
Joined: Tue Feb 26, 2013 6:00 am
Location: Mindfire Solutions
Contact:

Re: How to capture local lan ip in php

Postby sandeep605085 » Wed May 08, 2013 10:03 am

Hi,

Check this

<?php
$localLanIp = gethostbyname(trim(`hostname`));
?>

Thanks,
Sandeep Agrawal
Mindfire Solutions.


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest

cron