Re: [squid-users] PHP Captive portal and squid.

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 02 Oct 2010 03:59:54 +1300

On 28/09/10 10:17, Landy Landy wrote:
>
>> What's the reason that you can't get the customer IP
>> address?
>>
>> If you can find a way to get the IP address, then you could
>> use the
>> following (which uses iptables and PHP):
>>
>> http://www.andybev.com/index.php/Using_iptables_and_PHP_to_create_a_captive_portal
>>
>> Andy
>
>
> Thanks for replying.
>
> I actually looked at that page before and got ideas from it. It lacks some other things I would like to add the captive portal: I would like to get the page the user intended to go to and after doing the authentication on another server have the user continue to the intended page or redirect to a "disconnected due to payment" page.
>
> This is easily done with NoCatSplash but is written in perl and I need some php script to do this.
>

It's done in Squid by setting %s to the deny_info URL.
For example:
   deny info http://example.com/splash.php?p=%s foo

The 'p' query string parameter of the page/script will contain the
original requested URL.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.8
   Beta testers wanted for 3.2.0.2
Received on Fri Oct 01 2010 - 15:00:00 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 01 2010 - 12:00:04 MDT