Jump to content

Bill.Oakley

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

About Bill.Oakley

  • Birthday 05/21/1958

Profile Information

  • Gender
    Male
  • Location
    Australia

Bill.Oakley's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ok may have found a solution... I'll put it here in case someone else comes across the same issue one day and needs a guide. Windoze XP is capable as acting as a router, just that the route capability is by default switched off. To enable routing edit HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters. Look for IPEnableRouter and change from 0 [default] to 1. This can also be done by a PHP script by using the COM capability and the windoze inbuilt WSript.shell capability. Enabling my script to remain transportable and do the registry check / registry changes as required (keep in mind I am looking at distributing with something like XAMPP [bless them] and the script shouldn't require intervention of an IT tech to run) . Once routing is enabled, we can also run the windoze route command set such as: route ADD 12.0.0.0 MASK 255.0.0.0 192.168.11.2 to 'connect' the two IP ranges together. We can also specify the interface to be used for the routing! You can do more and I will be experimenting, refer the Windows ROUTE command - let alone WScript.shell which is real playground... Interesting aspect of my hunting around to find a solution is that there is a way to manipulate the windoze registry using PHP which I didn't think could be done.
  2. I would think you would mainly be interested in showing the current status when a user logs onto the page and this could be done simply enough with something like: if (date("D")=="Sat"||date("D")=="Sun"){echo"Closed";} else {$smtime=date("H"); if ($smtime<8||$smtime>=17) {Closed";} else if ($smtime<=8||$smtime<17){echo"Open";} else {echo"Open";} } you could also I suppose add a javascript to compare client local time to server time and have it call the display every hour to check.
  3. I am looking for a way that can set which Network device my script will use. In essence I have a TCP peripheral device with its own Network Connection via USB (let's call it Local Area Connection 2), the peripheral device acts as a DHCP server giving an IP address assigned of 192.168.11.2 At the same time the device also responds to UDP connections on a separate address of 12.0.0.1. There are no issues creating a connection to the device for TCP communications, however when I attempt communications via UDP the connection attempt is invariably routed to my prime Local Area Connection device rather than the peripheral. Disabling the prime Local Area Connection will allow the UDP traffic onto Local Area Connection 2 - and the device will respond, but only as long as it is the only active connection. Ok - so we could assign an IP address to the device (same as the original DHCP assigned address), and add a second address in the 12.0.0.x range. This will bind the adaptor to the required range however it does not make the script fully transportable. Is there a way to control which network device my script will use? without having to force IP address ranges. Currently I am using a socket client class for the 192... address TCP traffic, and a simple fsockopen arrangement for the UDP traffic. Operating system is windows (XP). This has had me stumped for some time now and I would greatly appreciate some assistance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.