Skip to content

Phils Blog and Stuff

TELECOMS. VIRTUALIZATION. IT. CODING. and more…

Menu
  • Home
  • Resources
    • Subnet Mask Cheat Sheet
    • Easy Dmarc+Email
    • MX Tool Box
  • Contact Me
Menu

Tag: PHP

A simple link shortener.. Fun little project…

Posted on 14/03/202313/03/2023 by Phil

We have all seen and used those URL shorting sites. It takes a very long link and converts it to a short link for emailing. When you click the short link it takes you to the link website address. Below I thought I would make my own. Feel free to use the below to make…

Read more

A Simple Load Balancer. Also Monitors Node Stats.

Posted on 13/03/202313/03/2023 by Phil

Below i document how to make a simple Load Balancer. This load balancer uses HAProxy and monitors the health of a server using a script. If the health of the server goes down, HAProxy Removes the Node from the “Cluster”. Below is the HAProxy Config. Below is the PHP Script running on the servers to…

Read more

Install Observium and PHP WeatherMaps on Debian 11.

Posted on 09/03/202309/03/2023 by Phil

Observium Installation You may need to install wget on bare installations Grab Observium installation script and run it. WeatherMap installation and configuration log on to gui “http://[IP_Address]/weathermap/editor.php” and make a new weather map “network.conf” click on “map properties. In “Output Image Filename” > “network.png”. In “Output HTML Filename” > “maps/network.html”. Once you have created a…

Read more

Simple PHP and Asterisk dialplan…

Posted on 10/03/201308/03/2023 by Phil

In This post I am just going to publish how to make a simple dial plan in asterisk by sending the call to PHP to process. The application is just going to be the standard asterisk Milliwatt application which answers a call and plays a continues tone. In asterisk (On an Ubuntu Server System), /etc/asterisk/extensions.con add [Milliwait] exten =>…

Read more

PHP… Simple Error Checking…

Posted on 07/12/201208/03/2023 by Phil

The below code is an example of providing some debug information by both email and logging the information to a file in “/var/logs/”. define(“CURRENT_FILE”, “thisfile.php”); define(“LOG_FILE_LOCATION”, “/var/log/”); function log_file($error1, $error2, $file) { $ok = true; // $file = “logile.txt”; if ($fh = fopen($file, ‘a’)) { $ok = true; $conf = “$error1 – $error2\n”; } else…

Read more

PHP… Do Not Run if running…

Posted on 07/12/201208/03/2023 by Phil

If you are creating an application that will be run in the terminal on a Linux machine and you don’t want it to run if its already running you can use the same code below to achieve this. class pid { protected $filename; public $already_running = false; function __construct($directory) { $this->filename = $directory . ‘/’ . basename($_SERVER[‘PHP_SELF’]) . ‘.pid’;…

Read more

Some Simple PHP code..

Posted on 14/11/201208/03/2023 by Phil

Below i am going to list some simple PHP code that makes up most of a PHP coded page. If..Elseif…Else… statments $something = “Cat”; if ($something==”Cat”) { print “Cat\n”; } elseif ($something==”Dog”) { print “Dog\n”; } else { print “Dont know\n”; Explode…foreach $ex = “cat:dog:mouse:goose”; $explode = explode(“:”, $ex); foreach ($explode as $exploded) { print…

Read more

CentOS 6 LAMP Install (Apache MySQL & PHP) via YUM

Posted on 22/04/201208/03/2023 by Phil

This tutorial will walk you through the process of installing a CentOS 6 LAMP server, LAMP stands for Linux Apache MySQL PHP and is often refereed to as a “LAMP Stack“. CentOS is a popular choice for web servers as it’s based on RHEL (Redhat Linux), this tutorial will use YUM to install the required packages. This…

Read more

Simple PHP Screen popping and message taking script

Posted on 28/01/201208/03/2023 by Phil

i wrote this little application a while ago as a test and for my own curiosity to see if i could create a message taking system to work with asterisk/trixbox. i was at the time going to present this to the employer i was working for however i left the company and did not get…

Read more

Auto Provisioning of Phones (Snom/Polycom/YeaLink/Linksys)

Posted on 21/06/201108/03/2023 by Phil

Using PHP and MySQL to integrate with Hello Telecoms existing systems I created scripts to enable phones to be auto provisioned from there Hosted VoIP Portal, to enable plug’n’play of most phones for both the private network and phones out on the Internet using Snom’s redirection server and some custom XML RPC coding. This has…

Read more

Little ol’Me

Greetings, I'm Phil, an Infrastructure Engineer with a wealth of 21 years of experience in the industry.

My expertise spans the domains of datacenter management, virtualization, VoIP implementation, and network design and configuration.

I have a penchant for Open Source software, particularly M0n0wall, pfSense, OPNsense, and VyOS.

Please don't hesitate to reach out to me for any inquiries or collaborations. Thanks! :-)

Donations - £5.00 GBP

POSTS

  • Home Assistant. Add water meter with PHP+MQTT+YML.
  • Automating your home with Home Assistant. Initial install and config (Hyper-V).
  • The importance of setting up email security correctly.
  • Automate Debian installations with Seed, DHCP and Nginx.
  • A simple link shortener.. Fun little project…

WORD CLOUD

3CX 3CX Phone System Apache Asterisk Cacti CentOS CRM DHCP DNS Email Fail over Failover File System Firewall FreeBSD FreeNAS FXO IAX install IP IP PBX Linux M0n0wall Nottingham Open Source PBX PFSense PHP Router Server SIP snom SSH TrixBox ubuntu VLAN Voice VoIP VPN vyatta WAN Website WiFi yealink ZFS

© 2023 Phils Blog and Stuff | Powered by Superbs Personal Blog theme