Tag: websites

How to get data from a web page using GET and POST methods in a Python script on Windows

Python programs and scripts can make requests to and receive data from websites and web services using the GET and POST methods (as well as other HTTP methods: PUT, PATCH and DELETE). But what if you want to pass data from a web page to a Python script? This can be done in several ways. How to get data from...

How to get data from a web page using GET and POST methods in a Python script

Python programs and scripts can make requests to and receive data from websites and web services using the GET and POST methods (as well as other HTTP methods: PUT, PATCH and DELETE). But what if you want to pass data from a web page to a Python script? This can be done in several ways. How to get data from...

How to install Python as a CGI module in Apache on Linux

Table of contents 1. How to run a Python script on a web server 2. How to set up Python as a CGI module in Apache on Debian (Ubuntu, Linux Mint, Kali Linux) 2.1 Setting up Python CGI for a single directory 2.2 Setting up Python CGI for the entire web server 3. How to set up Python as a...

How to set up Python as a CGI module in Apache on Arch Linux (Manjaro, BlackArch)

Setting up Python CGI for a single directory Create a directory /srv/http/cgi-bin/ - this is where the Python scripts will be located: sudo mkdir /srv/http/cgi-bin/ Open the /etc/httpd/conf/httpd.conf file – the web server configuration file: sudo gedit /etc/httpd/conf/httpd.conf Find a group of lines: <Directory "/srv/http/cgi-bin"> AllowOverride None Options None Require all granted </Directory> And replace it with: <Directory "/srv/http/cgi-bin"> AllowOverride...

How to set up Python as a CGI module in Apache on Debian (Ubuntu, Linux Mint)

Setting up Python CGI for a single directory Run the command to enable the CGI module: sudo a2enmod cgi Restart the web server for the changes to take effect: sudo systemctl restart apache2 Create file /usr/lib/cgi-bin/test.py: sudo gedit /usr/lib/cgi-bin/test.py Copy the following content to this file: #!/usr/bin/python3 print ("Content-type: text/html") print ("") print ("") print ("<html><head>") print ("") print ("</head><body>")...

How to reboot a server in DigitalOcean

DigitalOcean offers various cloud technologies for developers, but of all the variety of services, I use only VPS (virtual private server). At the same time, due to the large number of cloud solutions, it is not intuitively clear how to perform such a simple action in DigitalOcean as rebooting the VPS. The server can be restarted by connecting to it...

Sitemap.xml files: what they are for, how to use them, and how to bypass “Too many URLs” error and size limits

Table of contents What are Sitemaps What are the restrictions for sitemap files How can you compress a sitemap file Can I use multiple sitemaps? What is the structure of sitemap files How to generate sitemap files How to Import a Sitemap into Google Search Console Sitemap.xml file status “Couldn't fetch” Is it necessary to use the sitemap.xml file? What...

How to prevent Tor users from viewing or commenting on a WordPress site

The Tor network is an important tool for anonymity, privacy, and censorship circumvention, which in some countries is being fought even at the state level. But Tor is a public tool, so it can sometimes be used for online trolling and bullying. This article will show you how: prevent Tor users from commenting on your WordPress site prevent Tor users...

How to prevent search engines from indexing only the main page of the site

To prevent search engines from indexing only the main page, while allowing indexing of all other pages, you can use several approaches, depending on the characteristics of a particular site. 1. Using the robots.txt file If the main page has its own address (usually it is index.php, index.html, index.htm, main.html and so on), and while trying to open a link...

iThemes Security locked out a user – how to login to WordPress admin when user is banned (SOLVED)

iThemes Security is a plugin for WordPress that makes it difficult for hackers to attack the site and collect information. Among other features, iThemes Security has protection against brute-form paths (search for “hidden” folders and files), as well as protection against hacking user credentials by brute force passwords. Once set up, the iThemes Security plugin usually works fine and doesn't...
Loading...
X