Sponsored Content
Top Forums Programming Programming a Telegram Bot Using Node-RED, PHP, and MySQL Post 303045166 by Neo on Thursday 12th of March 2020 11:45:07 PM
Old 03-13-2020
Good job Ravinder.

Always a pleasure to see people learning new things and using that knowledge to solve real-world problems.

Can you use kind of system at your work?
This User Gave Thanks to Neo For This Post:
 

7 More Discussions You Might Find Interesting

1. Red Hat

Can't uninstall MYSQL from RED HAT ES

Hi Everyone Could you kindly advise on how I should do a chkconfig and uninstalling mysql rpm on Red hat ES.Please check the errors that I'm getting below. :eek: I need to uninstall MySQL completely from my linux system ver 2.4.21-37 and use the chkconfig command to switch it on... (15 Replies)
Discussion started by: CollenM
15 Replies

2. What is on Your Mind?

Telegram Bots - Bot Code Examples

I'm currently looking into ways to integrate the Telegram API into the forums: Telegram Bots - Bot Code Examples I'm thinking, first off, to use the Telegram API to get forum alerts and notifications (to Bot or Not?). Second, I thinking of ways to more deeply integrate Telegram into the... (5 Replies)
Discussion started by: Neo
5 Replies

3. Web Development

Node.js and mysql - ER_ACCESS_DENIED_ERROR

This problem has been killing me all day, and I cannot solve it. Basically, I am using node.js with the mysql module and it will not connect to the database. Here is the JS code snippet in node.js: app.get("/test", function(req, res) { var mysql = require("mysql"); var con =... (4 Replies)
Discussion started by: Neo
4 Replies

4. Infrastructure Monitoring

Using Node-RED and MQTT to Monitor Server and Application Stats

After setting up MQTT and testing some ESP8266 and ESP32 modules, where I noted that testing in Programming ESP32 (ESP-WROOM-32) as an MQTT Client Subscribed to Linux Server Load Average Messages, I was so impressed with MQTT that I installed MQTT on three different computers, instantly and... (2 Replies)
Discussion started by: Neo
2 Replies

5. Programming

Publish and Subscribe to AES-256 Encrypted MQTT Messages to Node-RED from PHP Scripts

Various Node-Red crypto modules do not work with PHP, so to send an encrypted message from a PHP script (in this case from a Ubuntu server) to Node-RED we need our own code. After a few hours of searching, testing various libs, more testing and debugging, I got this PHP to Node-RED code... (0 Replies)
Discussion started by: Neo
0 Replies

6. Programming

Node-RED: Writing MQTT Messages to MySQL DB with UNIX timestamp

First, I want to thank Neo (LOL) for this post from 2018, Node.js and mysql - ER_ACCESS_DENIED_ERROR I could not get the Node-RED mysql module to work and searched Google until all my links were purple! I kept getting ER_ACCESS_DENIED_ERROR with the right credentials. Nothing on the web was... (0 Replies)
Discussion started by: Neo
0 Replies

7. What is on Your Mind?

MQTT, Node-RED, Linux, Apache2, MySQL, PHP, Telegram, ESP32, ESP8266, Arduino

I have just completed the first phase of integrating all these devices and technologies: MQTT, Node-RED, Linux, Apache2, MySQL, PHP, Telegram, ESP32, ESP8266, and the Arduino Uno The glue that binds all this together is MQTT. In fact, MQTT makes this kind of integration nearly trivial to... (1 Reply)
Discussion started by: Neo
1 Replies
Data::Validate::URI(3pm)				User Contributed Perl Documentation				  Data::Validate::URI(3pm)

NAME
Data::Validate::URI - common url validation methods SYNOPSIS
use Data::Validate::URI qw(is_uri); if(is_uri($suspect)){ print "Looks like an URI "; } else { print "Not a URI "; } # or as an object my $v = Data::Validate::URI->new(); die "not a URI" unless ($v->is_uri('foo')); DESCRIPTION
This module collects common URI validation routines to make input validation, and untainting easier and more readable. All functions return an untainted value if the test passes, and undef if it fails. This means that you should always check for a defined status explicitly. Don't assume the return will be true. The value to test is always the first (and often only) argument. There are a number of other URI validation modules out there as well (see below.) This one focuses on being fast, lightweight, and relatively 'real-world'. i.e. it's good if you want to check user input, and don't need to parse out the URI/URL into chunks. Right now the module focuses on HTTP URIs, since they're arguably the most common. If you have a specialized scheme you'd like to have supported, let me know. FUNCTIONS
new - constructor for OO usage new(); Description Returns a Data::Validator::URI object. This lets you access all the validator function calls as methods without importing them into your namespace or using the clumsy Data::Validate::URI::function_name() format. Arguments None Returns Returns a Data::Validate::URI object is_uri - is the value a well-formed uri? is_uri($value); Description Returns the untainted URI if the test value appears to be well-formed. Note that you may really want one of the more practical methods like is_http_uri or is_https_uri, since the URI standard (RFC 3986) allows a lot of things you probably don't want. Arguments $value The potential URI to test. Returns Returns the untainted URI on success, undef on failure. Notes, Exceptions, & Bugs This function does not make any attempt to check whether the URI is accessible or 'makes sense' in any meaningful way. It just checks that it is formatted correctly. is_http_uri - is the value a well-formed HTTP uri? is_http_uri($value); Description Specialized version of is_uri() that only likes http:// urls. As a result, it can also do a much more thorough job validating. Also, unlike is_uri() it is more concerned with only allowing real-world URIs through. Things like relative hostnames are allowed by the standards, but probably aren't wise. Conversely, null paths aren't allowed per RFC 2616 (should be '/' instead), but are allowed by this function. This function only works for fully-qualified URIs. /bob.html won't work. See RFC 3986 for the appropriate method to turn a relative URI into an absolute one given its context. Returns the untainted URI if the test value appears to be well-formed. Note that you probably want to either call this in combo with is_https_uri(). i.e. print "Good" if(is_http_uri($uri) || is_https_uri($uri)); or use the convenience method is_web_uri which is equivalent. Arguments $value The potential URI to test. Returns Returns the untainted URI on success, undef on failure. Notes, Exceptions, & Bugs This function does not make any attempt to check whether the URI is accessible or 'makes sense' in any meaningful way. It just checks that it is formatted correctly. is_https_uri - is the value a well-formed HTTPS uri? is_https_uri($value); Description See is_http_uri() for details. This version only likes the https URI scheme. Otherwise it's identical to is_http_uri() Arguments $value The potential URI to test. Returns Returns the untainted URI on success, undef on failure. Notes, Exceptions, & Bugs This function does not make any attempt to check whether the URI is accessible or 'makes sense' in any meaningful way. It just checks that it is formatted correctly. is_web_uri - is the value a well-formed HTTP or HTTPS uri? is_web_uri($value); Description This is just a convinience method that combines is_http_uri and is_https_uri to accept most common real-world URLs. Arguments $value The potential URI to test. Returns Returns the untainted URI on success, undef on failure. Notes, Exceptions, & Bugs This function does not make any attempt to check whether the URI is accessible or 'makes sense' in any meaningful way. It just checks that it is formatted correctly. is_tel_uri - is the value a well-formed telephone uri? is_tel_uri($value); Description Specialized version of is_uri() that only likes tel: urls. As a result, it can also do a much more thorough job validating according to RFC 3966. Returns the untainted URI if the test value appears to be well-formed. Arguments $value The potential URI to test. Returns Returns the untainted URI on success, undef on failure. Notes, Exceptions, & Bugs This function does not make any attempt to check whether the URI is accessible or 'makes sense' in any meaningful way. It just checks that it is formatted correctly. SEE ALSO
URI, RFC 3986, RFC 3966, RFC 4694, RFC 4759, RFC 4904 AUTHOR
Richard Sonnen <sonnen@richardsonnen.com>. is_tel_uri by David Dick <ddick@cpan.org>. COPYRIGHT
Copyright (c) 2005 Richard Sonnen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-03-18 Data::Validate::URI(3pm)
All times are GMT -4. The time now is 08:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy