Some things are implemented in PHP.
Unfortunately the name is too short to be wiki-searchable,
but try the What links here button.
See also Software.
A quick and easy way to see PSYC happen in PHP is by looking at the example code below, or by inspecting the Wikinotify tool.
Example application
Here is a generic notification code snippet for php applications which sends a notice to a PSYC place.
<?php $myMsg = "This page has just been clicked."; $myApp = "Example"; # information below is redundant, but parsing URIs is work $psyctarget = "psyc://localhost/@example"; $psychost = "udp://localhost"; $psycport = 4404; $udp = fsockopen($psychost, $psycport); fwrite($udp, ".\n" . ":_target\t$psyctarget\n" . "\n" # move on from routing layer to application layer . ":_nick\t". $myApp ."\n" . ":_content\t". $myMsg ."\n" . "_notice_update_whatever\n" # always put dynamic data in variables, not into the body template . "[_nick] has been updated: [_content]\n" . ".\n"); fclose($udp); return true; ?>
Here's suitable place.gen code to receive these notices. Put it into place/example.c, then /enter example.
#define ALLOW_EXTERNAL_FROM "psyc://localhost" #include <place.gen>
This code presumes you are running psyced on the same host with the php application. You need to replace those localhost references appropriately, if that is not the case.
Read more about the PSYC syntax with its body and variables and its distinction of routing and application layers.