python modified http.server to run php

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



python modified http.server to run php



hey I am trying to run php files using a modified version of http.server but don't know where to begin, can anyone please refer me to any helpful links or google keywords I could search please?


import sys
from http.server import HTTPServer, SimpleHTTPRequestHandler, test as Brain_Link
import tkinter
import tkinter.messagebox as mbox
window = tkinter.Tk()
window.wm_withdraw()
window.attributes("-topmost", True)

def Start_Brain_Link(*args):
Brain_Link(*args, port=22222)

def its_ok():
mbox.showinfo('A.I','Brain-Link Established!')

def its_bad():
mbox.showinfo('A.I','Brain-Link Attemp Blocked!')

class CORSRequestHandler(SimpleHTTPRequestHandler):
def end_headers (self):
if mbox.askquestion("Warning!", self.client_address[0]+" Requested Brain-Link!", icon='warning') == 'yes':
self.send_header('Access-Control-Allow-Origin', '*')
SimpleHTTPRequestHandler.end_headers(self)
window.after(0,its_ok)
else:
window.after(0,its_bad)

if __name__ == '__main__':
Start_Brain_Link(CORSRequestHandler, HTTPServer)



also I got this weird bug here if anyone can help me solve it please I talked about it here:
tkinter after not running









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard