mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Move post/curl/fetchUrl/fetchUrlFull to own class "Network\HTTPRequest"
This commit is contained in:
parent
31bd1a1ba0
commit
9640142a72
18 changed files with 50 additions and 45 deletions
|
@ -5,10 +5,11 @@
|
|||
* Version: 0.1
|
||||
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
|
||||
*/
|
||||
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\DI;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
|
||||
function leistungsschutzrecht_install() {
|
||||
Hook::register('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
|
||||
|
@ -79,7 +80,7 @@ function leistungsschutzrecht_fetchsites()
|
|||
{
|
||||
// This list works - but question is how current it is
|
||||
$url = "http://leistungsschutzrecht-stoppen.d-64.org/blacklist.txt";
|
||||
$sitelist = Network::fetchUrl($url);
|
||||
$sitelist = HTTPRequest::fetchUrl($url);
|
||||
$siteurls = explode(',', $sitelist);
|
||||
|
||||
$whitelist = ['tagesschau.de', 'heute.de', 'wdr.de'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue