iCal Calendar – PHP Code Library

Due to a new feature development for the Joomla Extension Easy GCalendar we have created the iCal PHP Library. The Code is distributed under the MIT license and work also stand alone.   Installation The Codeninja iCal library is available via GitHub download only. Download Introduction This library offers a abstraction layer for creating iCal Calendars and .ics files. The output will be generated according RFC 5545. The following types are currently supported and could be used in combination: VCALENDAR VEVENT Basic Usage Create a Calendar object $calendar = new \Codeninja\iCal\Calendar(''); Create a new Event object $myEvent = new \Codeninja\iCal\Event(); Add required and optional information to the Event object $myEvent->setDtStart(new \DateTime()); $myEvent->setDtEnd(new \DateTime()); $myEvent->setisAllDay(true); $myEvent->setSummary('Summary: Lorem Ipsum'); $myEvent->setDescription('Lorem Ipsum is simply dummy text of the printing industry.'); Add event to calendar object $calendar->addEvent($myEvent); Generate & display output $content = $calendar->render(); echo $content; And that's it, have fun!

By | 2017-07-22T16:24:02+00:00 May 6th, 2017|PHP, Programming|0 Comments

Finding spam sending PHP scripts on a linux server

Sometimes there are users on a server that may have installed old PHP scripts with known security gaps this can cause that this PHP scripts will spam senders. Finding these PHP scripts could be very difficult. With the release of of PHP 5.3 they have added new functionality to make it easier to handel the tracking of spammers or exploited web forms. The new functions are affected by settings in the server php.ini, you should have a more detailed look on the offical documentation ( If we open the server php.ini file we should find the following 3 settings: mail.add_x_header (Add X-PHP-Originating-Script that will include UID of the script followed by the filename.) mail.log (The path to a log file that will log all mail() calls. Log entries include the full path of the script, line number, To address and headers.) mail.force_extra_parameters (Force the addition of the specified parameters to be passed as extra parameters [...]

By | 2016-10-29T13:50:15+00:00 May 24th, 2016|Allgemein, Debian, Linux|Comments Off on Finding spam sending PHP scripts on a linux server

Parallels Plesk Panel 11 Non-chrooted Cronjobs

Plesk 11 dosn’t allow you to execute cronjobs outside your chrooted shell so e.g. if you want to call a php file over the Plesk Panel cron management you get in trouble becouse the binary dosn’t exists within the chrooted enviroment. If you trust your customers enough to allow execution of scripts in a non-chrooted environment, you could enable it by the follwoing shell command: For Plesk Panel 10: Console command to enable: /usr/local/psa/admin/bin/server_pref -u -crontab-secure-shell "/bin/sh" Console command to revert this setting: /usr/local/psa/admin/bin/server_pref -u -crontab-secure-shell "" […]

By | 2016-10-29T13:52:45+00:00 January 25th, 2013|Parallels Plesk Panel|1 Comment