I am trying to build a form in my laravel app to get all users’ profiles that are in or x km around one selected city from my cities table. I’m trying to use the laravel-mysql-spatial that makes use of the ST_DISTANCE_SPHERE mysql function but cant really wrap my brain around the eloquent stuff ne…
Receiving “Your antiforgery token is invalid” on PHP cURL but not in Python requests
I am developing an application which crawls data from another website. That website is protected by a login, but I have an account there. My application should login to that website and return the …
PHP Wrap ALL fields in quotes fputcsv()
I’m relatively new to PHP so please bear with me. my code currently looks like this: This works as expected, however, the client requires ALL fields to be wrapped in quotations, not just those containing spaces. I’ve seen a lot of solutions online but they all seem overly complicated or seem to su…
accounts.google.com redirected you too many times in Laravel Socialite
I am working on social login in Laravel. When passing parameter for identifying sign in and signup, it occurs error. “accounts.google.com redirected you too many times.” Without a parameter, it works well. These are my router. This is my controller. This is my view. Answer I just found a route iss…
Update Catalina to Big Sur apache error /private/etc/apache2/httpd.conf: Could not open configuration file /private/etc/apache2/other/+php-osx.conf [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 1 year ago. Improve this question I update my macOS from Catalina to Big Sur. After updating my apache is n…
Manipulate string to convert it to another string with different format
I have a string in the following form: The first letter is a sort of label, the value is associated with a label. I must manipulate and convert my string to the following: With a simple loop, I created an array $temp: Starting from here, I could eventually loop again to build my new string. Or maybe I could d…
PHP curl strange behavior PUT vs. POST
One of my projects contains an interface to a web based database, which I call using curl. A curl with -X PUT will create a new record, a curl with -X POST will update an existing record. If I perform this using Advanced REST Client, it works as it should. If I try this using a call of curl_exec out
PHP Group array by date
I have the following array that gathers data from purchases, visits and coupons generated in my application: array:10 [ 0 => array:2 [ “dt” => “2020-11-18” “cupoms” => 9 ] 1 => array:2 [ “dt” => “2020-11-19” “cupoms” => …
Get File from FTP server only for current date via FTP
I am trying to get a file from FTP with the last modified date as today. This works perfectly if I know the file name. In my FTP server, the file name is dynamic. I only know the file extension which .csv and has one CSV file with many other different files. how do I get only the .csv file
Fix Leaflet not including picture on a generated map
I am using leaflet to create a map with a picture on it. The picture is generated from gda2tiles.py from a .tif file. The picture is currently generated successfully and it can be viewed when I open …