Difference between revisions of "Php"

From neil.tappsville.com
Jump to navigationJump to search
(Created page with "==PHP Scripts== Proxy an image from a local system that requires authorisation, such as a internal Security DVR, no proxy required. Save this image.php and wa-la <pre> <?php...")
 
m
 
(3 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
==BBClone==
 
==BBClone==
  
As the developers say 'A PHP based Web Counter on Steroids', this is what I use count unique vistors on the main site
+
As the developers say 'A PHP based Web Counter on Steroids', this is what I used to use to count unique vistors on the main site
 +
Unfortunately it fell out of favour - its must easier to get google to do this for you.
  
 
To upgrade to a newer version.
 
To upgrade to a newer version.
Line 19: Line 20:
 
* Copy all files except /var
 
* Copy all files except /var
 
* Then reconfigure conf/config.php
 
* Then reconfigure conf/config.php
 +
 +
==Librenms==
 +
 +
Wierd quirk on the dashboard where links in the Availability Map or World Map do not go to devices.
 +
Instead of <code>https://librenms/device/device=2/</code>  the url is <code>https://librenms/@deviceUrl($device)</code>
 +
 +
Librenms uses a php module called Laravel which essentially caches/stashes values in a a hidden form, sometimes the cache needs to be cleared (n.b a restart of httpd nor a reboot of the host fixed this) - magical fix is <code>php artisan view:clear</code>
 +
 +
Found: https://codeburst.io/just-in-case-laravel-create-custom-blade-directive-b60a7160949d
 +
 +
 +
=CSS and HTML Validators=
 +
 +
* https://jigsaw.w3.org/css-validator/
 +
* https://validator.w3.org/

Latest revision as of 20:41, 12 October 2022

PHP Scripts

Proxy an image from a local system that requires authorisation, such as a internal Security DVR, no proxy required. Save this image.php and wa-la

<?php
$temp = file''get''contents('http://user:password@host.com/cgi-bin/guest/Video.cgi?media=JPEG');
header("content-type: image/jpeg");
echo ($temp);
?>

BBClone

As the developers say 'A PHP based Web Counter on Steroids', this is what I used to use to count unique vistors on the main site Unfortunately it fell out of favour - its must easier to get google to do this for you.

To upgrade to a newer version.

  • Copy all files except /var
  • Then reconfigure conf/config.php

Librenms

Wierd quirk on the dashboard where links in the Availability Map or World Map do not go to devices. Instead of https://librenms/device/device=2/ the url is https://librenms/@deviceUrl($device)

Librenms uses a php module called Laravel which essentially caches/stashes values in a a hidden form, sometimes the cache needs to be cleared (n.b a restart of httpd nor a reboot of the host fixed this) - magical fix is php artisan view:clear

Found: https://codeburst.io/just-in-case-laravel-create-custom-blade-directive-b60a7160949d


CSS and HTML Validators