Skip to content

Tag: php

SNMP DateAndTime hex-string convert to human date in PHP

When i want to get the cablemodem event log via SNMP, then i snmpwalk the ‘mib-2.69.1.5.8.1’ oid, but I had the problem because the SNMP store every event date in ‘special’ hex-string called DateAndTime format. (In my case this is a 8 byte hex-string, like this: 07 B2 01 01 00 0A 14 00…

Way to generate virtual mac address in PHP

I am working on web application where I will need to generate demo mac address for each record. There will be plenty of records for which I will need demo mac address. So how to generate unique mac address using PHP? Note – I don’t want exact mac address – I will need something unique like m…

How to json_encode $GLOBALS?

I’m trying to debug a PHP application, and as a section of the debug process, I passed print_r($GLOBALS) through the AJAX request to my browser. However, I’d prefer to see it in native JSON form because it comes out better in the browser. I’m trying to use the following snippet of code: but …

Laravel routes aren’t working with 1&1 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question Many many many topics about this, but I have to say that none are helping me a great deal. I …

PHP hide fatal error message and redirect

If the following code returns a fatal error, I get a message on the page I don’t want users to see. I want to hide the fatal error message and redirect the user to another page: To hide the error message, I just added: But how do I catch and redirect a fatal error like this? Answer Basicaly, you can&#82…