[ Date Index ][
Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]
On Wednesday 27 Aug 2003 3:50 pm, Richard Brown wrote: > Hi All > > Is it possible to write a PHP script that will activate a dial out using > KPPP? No. I tried this in various guises over a period of about 3 months before I had ISDN. KPPP won't respond to a network request and PHP cannot execute KPPP directly. (It would still prompt you anyway). I got around it by switching from KPPP to pppd. The daemon itself can be set to operate as dial-on demand. You need to make the ISP settings manually. I posted full details when I got it working for Tiscali: http://www.dclug.org.uk/archive-Nov01-May02/msg00572.html You might need to experiment with the settings for your ISP. Once working, I used a PHP script to test if I WAS online without actually GOING online. It only works on the same machine as the pppd daemon, but it basically just checked /var/run for the pppd.pid file using file_exists() http://php.linux.hr/manual/en/function.file-exists.php To go online with dial-on demand, just click any bookmark, ping a machine, open an FTP connection, SSH connection, Telnet (perhaps not), anything that is not located on your own machine or LAN. (Note that pppd may well start if you request certain LAN services - it depends on the configuration of the service daemon, e.g. some FTP servers request a reverse DNS lookup even for a LAN connection - /etc/hosts isn't enough to do that, so the LAN FTP request ends up being referred to an internet DNS nameserver that, predictably, knows nothing about your LAN machines. Pointless I know, but you'd have to get to grips with a DNS nameserver daemon to solve it.) -- Neil Williams ============= http://www.codehelp.co.uk http://www.dclug.org.uk http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
Attachment:
pgp00055.pgp
Description: signature