Skip to content
Advertisement

Tag: http

How to submit a POST using tag?

I realize we need forms to submit a POST or perhaps with the help of a button. However, how do we do it using tags? Example code: I’m trying use PHP to read a text file for a number of variables (names of each picture that I’ve saved). From the text file, this PHP will then convert the variables into

Preventing http access in Laravel 8

I have a question about force using HTTPS in laravel, i’ve added a condition inside AppServiceProvider.php, creating a middleware and modifying the .htaccess file. But I can still access the http page. Is there any other way to get laravel to redirect to https instead of http, and how to prevent user to acces the http addres? thank you! my

Is it possible to have web index outside public html?

Say a website has this folder structure And when someone visits the website I want the physical web root to point to /public, like mywebsite.com/dikpic.jpeg (without url rewrites). This can be achieved with the root /myuser/public; command. But I also want to load the index.php file from outside this directory: The problem is with the location try files block that

PHP: How to play random mp4 videos in static url .php

I have a code in PHP language hosted in webcindario.com (free hosting), that shows on click a video randomly. But it works ONLY in VLC Player for Windows. The result is that the Chrome browser or Android donĀ“t show the video: And I have these questions: Is there a way to get the code to work on Android devices and

How do I set up my server to work with PHP

I want to use PHP with a server that i’ve coded my self. (Not Apache etc) I guess I have to send the http request and some additional data from my server to php, but I dont know how to make that connection and how to format that message. I know I can run scripts with php.exe, the problem is

Laravel 8 custom headers run only for home page

I want to add custom headers for every response from my Laravel project. I created a middleware using php artisan make:middleware customheaders then I used this code in customheaders middleware then I added my class to kernel Now if I run my application home page localhost:8000 I can see my custom headers but if I go to any other page

PHP get_headers function always HTTP/1.1

The PHP get_headers function returns an array, eventually including a string like HTTP/1.1 200 OK. The URLs I pass to the function are https. For some reason the successful response of get_headers always has HTTP/1.1, but Firefox devtools – network tab says it’s HTTP/2. I call the function like $headers = get_headers(“https://SOME_URL”, 1);. The second parameter just affects the format

Advertisement