| images | ||
| include | ||
| library/HTML5 | ||
| mod | ||
| util | ||
| view | ||
| .gitignore | ||
| .htaccess | ||
| .htconfig.php | ||
| boot.php | ||
| dfrndir.sql | ||
| index.php | ||
| README.md | ||
Friendica Global Directory
Example cronjob.
*/30 * * * * www-data cd /var/www/friendica-directory; php include/cron_maintain.php
*/5 * * * * www-data cd /var/www/friendica-directory; php include/cron_sync.php
How submissions are processed
-
The /submit endpoint takes a
?url=parameter. This parameter is an encoded URL, the original ASCII is treated as binary and base16 encoded. This URL should be a profile location, such ashttps://fc.oscp.info/profile/admin. This URL will be checked in the database for existing accounts. This check includes a normalization, http vs https is ignored as well as www. prefixes. -
If noscrape is supported by the site, this will be used instead of a scrape request. In this case
https://fc.oscp.info/noscrape/admin. If noscrape fails or is not supported, the url provided (as is) will be scraped for meta information.<meta name="dfrn-global-visibility" content="true" /><meta name="friendica.community" content="true" />or<meta name="friendika.community" content="true" /><meta name="keywords" content="these,are,your,public,tags" /><link rel="dfrn-*" href="https://fc.oscp.info/*" />any dfrn-* prefixed link and it's href attribute..vcard .fnasfn.vcard .titleaspdesc.vcard .photoasphoto.vcard .keyaskey.vcard .localityaslocality.vcard .regionasregion.vcard .postal-codeaspostal-code.vcard .country-nameascountry-name.vcard .x-genderasgender.marital-textasmarital
-
If the
dfrn-global-visibilityvalue is set to false. Any existing records will be deleted. And the process exits here. -
A submission is IGNORED when at least the following data could not be scraped.
keythe public key from the hCard.dfrn-requestrequired for the DFRN protocol.dfrn-confirmrequired for the DFRN protocol.dfrn-notifyrequired for the DFRN protocol.dfrn-pollrequired for the DFRN protocol.
-
If the profile existed in the database and the profile is not explicitly set to public using the
dfrn-global-visibilitymeta tag. It will be deleted. -
If the profile existed in the database and the profile lacks either an
fnorphotoattribute, it will be deleted. -
The profile is now inserted/updated based on the found information. Notable database fields are:
homepagethe originally (decoded)?url=parameter.nurlthe normalized URL created to remove http vs https and www vs non-www urls.createdthe creation date and time in UTC (now if the entry did not exist yet).updatedthe current date and time in UTC.
-
If an insert has occurred, the URL will now be used to check for duplicates. The highest insert ID will be kept, anything else deleted.
-
If provided, your public tags are now split by
(space character) and stored in the tags table. This uses your normalized URL as unique key for your profile. -
The
photoprovided will be downloaded and resized to 80x80, regardless of source size. -
Should there somehow have been an error at this point such as that there is no profile ID known. Everything will get deleted based on the original
?url=parameter.