REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 1.90 KB
Close
/home/getspomw/royalsquad.us/vendor/stevebauman/location/src/Drivers/Cloudflare.php
Text
Base64
<?php namespace Stevebauman\Location\Drivers; use Illuminate\Support\Fluent; use Stevebauman\Location\Position; use Stevebauman\Location\Request; class Cloudflare extends Driver { /** * {@inheritDoc} */ protected function process(Request $request): Fluent|false { // This is available both from CloudFlare's dashboard and Managed Transforms. $countryCode = $request->getHeader('cf-ipcountry'); // Unknown and Tor values if (! $countryCode || in_array($countryCode, ['XX', 'T1'])) { return false; } // These are only available if the relevant Managed Transform is configured. // https://developers.cloudflare.com/rules/transform/managed-transforms/reference/#http-request-headers return new Fluent([ 'countryCode' => $countryCode, 'cityName' => $request->getHeader('cf-ipcity'), 'longitude' => $request->getHeader('cf-iplongitude'), 'latitude' => $request->getHeader('cf-iplatitude'), 'region' => $request->getHeader('cf-region'), 'regionCode' => $request->getHeader('cf-region-code'), 'postalCode' => $request->getHeader('cf-postal-code'), 'timezone' => $request->getHeader('cf-timezone'), ]); } /** * {@inheritDoc} */ protected function hydrate(Position $position, Fluent $location): Position { $position->countryCode = $location->countryCode; $position->isoCode = $location->countryCode; $position->cityName = $location->cityName; $position->longitude = $location->longitude; $position->latitude = $location->latitude; $position->regionName = $location->region; $position->regionCode = $location->regionCode; $position->postalCode = $location->postalCode; $position->timezone = $location->timezone; return $position; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 13
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Cloudflare.php
1.90 KB
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Driver.php
2.03 KB
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
GeoPlugin.php
1.00 KB
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HttpDriver.php
1.45 KB
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Ip2locationio.php
1.23 KB
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
IpApi.php
1.06 KB
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
IpApiPro.php
394 B
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
IpData.php
1.12 KB
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
IpInfo.php
1.11 KB
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
IpInfoLite.php
691 B
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Kloudend.php
1.06 KB
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MaxMind.php
6.58 KB
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Updatable.php
199 B
lrw-rw-rw-
2025-08-03 14:03:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).