php

Implementing REST API digital signature

Implementing REST API digital signature Question: I’m currently trying to implement a minimal REST API with digital signature. I understand that the underlying concept is that the sender sign the payload with its private key using HMAC and that the receiver verify this signature with the public key. However I have some difficulties implementing a …

Total answers: 1

Take snapshots of Youtube videos to create a preview GIF programatically

Take snapshots of Youtube videos to create a preview GIF programatically Question: I use the Youtube API to integrate content into my site. But, it doesn’t provide any good snapshots of the videos. It provides a few very low quality snapshots that are virtually unusable. https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg https://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg https://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg https://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg For example: https://img.youtube.com/vi/XdwaASKJGxo/1.jpg creates the following: …

Total answers: 3

Python and PHP compatibility in Web-Dvelopment, is it possible?

Python and PHP compatibility in Web-Dvelopment, is it possible? Question: I’m working with legacy PHP project where all back-bones was written in PHP. I like scriptting features, useful and fun things in Python. Question : Is it possible somehow implement Python scripts in PHP Back-end? Want to hear experts of web-development sector. Asked By: Ada …

Total answers: 1

PHP exec cannot execute Python script

PHP exec cannot execute Python script Question: I use PHP in Windows 11. I cannot execute Python script in PHP exec. The current situation is as follows, Commands that do not call Python scripts can be executed: exec("cd E:/Python/WordFrequency && ipconfig", $output, $result_code); exec("Python -V", $output, $result_code); The above two lines of code return code …

Total answers: 1

How to configure apache for flask and php on the same server

How to configure apache for flask and php on the same server Question: The server that I’ve been upgrading/updating has pages using php and python. I’ve rewritten the python based pages using the Flask framework and apache is configured using wsgi: <VirtualHost *:443> ServerName my_fake_site … AliasMatch ^/((?:flask_dir1|flask_dir2).*).((css|php|png)$((?:?.*)?)) /var/www/html/app/$1.$2 AliasMatch ^/(.*).(css|html|php|png) /var/www/html/$1.$2 WSGIDaemonProcess main_proc processes=8 …

Total answers: 1

How to pass php functional parameters from python script and get output?

How to pass php functional parameters from python script and get output? Question: I’m working on a python plugin & it needs to retrive some data from php script, As I tried below I can retrive php output as shell command, But I need to call start() function from my python script by passing values …

Total answers: 1

Any alternatives to `INET6_ATON` SQL function, but in Python?

Any alternatives to `INET6_ATON` SQL function, but in Python? Question: I want to convert a PHP program that uses MySQL to Python. I found a way to store the database but I need to find a Pythonic alternative to the INET6_ATON SQL function. Can someone help me, please? Asked By: HGStyle || Source Answers: Extending …

Total answers: 1

How to run python function in laravel with symfony process?

How to run python function in laravel with symfony process? Question: I have a python function which returns string data, code runs fine after run import mysql.connector mydb = mysql.connector.connect( host="localhost", user="root", passwd="", database="db_absensi" ) mycursor = mydb.cursor() def example(): mycursor.execute("SELECT * FROM examples) data = mycursor.fetchall() return data this is my symfony code public …

Total answers: 1

Using a single websocket for a multiple clients

Using a single websocket for a multiple clients Question: I’ve never used before websockets neither web workers and everything around that. Obviously, I’m lost and I don’t know how to make it properly. I’ve learned how to make a websocket and leave it working in a server port successfully. As well, load a web worker …

Total answers: 1