[FX.php List] Capturing IP for a choice calc

DC dan.cynosure at dbmscan.com
Wed Mar 1 10:47:43 MST 2006


this doesn't work because it relies on superglobals being on and it is 
usually off because of security risk.

dan

Peter Bates had written:
> Hi Allyson,
> 
> Thanks for the reply, but I guess I'm too dumb to understand how to use 
> it. I've tried it as:
> 
> <?
> echo GetHostByName($REMOTE_ADDR);
> ?>
> 
> I get no results. Please expand your code a bit.
> 
> Peter
> 
> On Mar 1, 2006, at 10:24 AM, Allyson Olm wrote:
> 
>> Hi Peter,
>>
>>  
>>
>> This should get you started.  You can use the following to get the 
>> user’s IP address.
>>
>>  
>>
>> GetHostByName($REMOTE_ADDR)
>>
>>  
>>
>> You can then check this against your in-house IP’s.
>>
>>  
>>
>> In kindness,
>>
>> Allyson Olm
>>
>> FMWebschool
>>
>> http://www.fmwebschool.com
>>
>> ------------------------------------------------------------------------
>>
>> *From:* fx.php_list-bounces at mail.iviking.org 
>> [mailto:fx.php_list-bounces at mail.iviking.org] *On Behalf Of *Peter Bates
>> *Sent:* Wednesday, March 01, 2006 10:12 AM
>> *To:* FX.php Discussion List
>> *Subject:* [FX.php List] Capturing IP for a choice calc
>>
>>  
>>
>> I'm building a solution that contains some copyrighted material on our 
>> website. We have permission to share the copyrighted material with our 
>> patrons while they are in one of our building, but not if they are 
>> accessing the site from outside the building. I'm assuming that I need 
>> to capture the requesting IP address before the data is displayed that 
>> basically does the following:
>>
>>  
>>
>> If IP = Our in-house IP range <!-- We have our own in-house network, 
>> inside and outside DNS servers, web server, etc. -->
>>
>> Show data from field "x" <!-- This would be actually a link that is 
>> stored in a FMP field. -->
>>
>> Else
>>
>> Show "We're sorry, but due to copyright restrictions, this material is 
>> only available in one of our library branches" <!-- This would be 
>> displayed in place of the data from field "x" -->
>>
>> End If
>>
>>  
>>
>> As I am still floundering around using FileMaker Pro with FX.php, I 
>> would deeply appreciate any help that could point me into the right 
>> direction to code this.
>>
>>  
>>
>> Mac OS X Server 10.4x, FileMaker Server Advanced 8x, PHP 4.x
>>
>>  
>>
>> Thanks,
>>
>> Peter
>>
>>  
>>
>> Peter Bates
>>
>> Microcomputer Network Specialist
>>
>> Automated Services
>>
>> St. Joseph County Public Library
>>
>> 304 S. Main St.
>>
>> South Bend, IN 46601
>>
>> voice: (574) 282-4610
>>
>> fax: (574) 282-4662
>>
>> e-mail: p.bates at sjcpl.org <mailto:p.bates at sjcpl.org>
>>
>> www: http:/www.libraryforlife.org <http://www.libraryforlife.org>
>>
>> library catalog:
>>
>> http://www.libraryforlife.org/onlinecatalog/onlinecatalog.html
>>
>>
>>
>>  
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org <mailto:FX.php_List at mail.iviking.org>
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list


More information about the FX.php_List mailing list