Comments (2)
As far as I know, this package doesn't support installing without composer.
If you want to install this package without composer, you may use following PHP code snippets.
And these code snippets will help you to load IPInfo
classes manually.
<?php
/**
* This is the bingo-functional autoloader.
*
* @param string $class The fully-qualified class name.
*
* @return void
*/
spl_autoload_register(function ($class) {
// project-specific namespace prefix
$prefix = 'ipinfo\\ipinfo\\';
// base directory for the namespace prefix
$baseDir = __DIR__.'/src/';
// does the class use the namespace prefix?
$len = strlen($prefix);
if (strncmp($prefix, $class, $len) !== 0) {
// no, move to the next registered autoloader
return;
}
// get the relative class name
$relativeClass = substr($class, $len);
// replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = $baseDir.str_replace('\\', '/', $relativeClass).'.php';
// if the file exists, require it
if (file_exists($file)) {
require $file;
}
});
from php.
Once using this manual autoload
that I mention on previous discussion, it will be worked fine to load IPinfo
classes.
But the Class 'GuzzleHttp/Client' not found
will be thrown.
You have to handle manual "third-party" loader and it will be very complicated and frustrated.
IMHO, using the composer
autoloader directly instead to avoid these issues.
from php.
Related Issues (20)
- Step by step install not working HOT 4
- Implement Stringable interface
- More info on why response object can be null when calling IPinfo::getDetails() HOT 12
- Hopper
- Retrieving your public IPv6 address
- The php api does not work on the server but it does on the localhost HOT 1
- Make it possible to use sabre/cache version 2 HOT 4
- Just a detail (php8.2): Creation of dynamic property ipinfo\ipinfo\IPinfo::$settings is deprecated HOT 1
- Error with cache key HOT 1
- Inline all data files HOT 1
- Retrieving an IPV6 throw an exception HOT 1
- Can I use downloaded Geolocation API database to initialize this client? HOT 1
- Does not work with PHP 8.2+ HOT 1
- Hi
- 1
- FONT FAMILIES. GUESS IT WAS FORFIÉTURE HOT 1
- `
- {
- https://www.alonsodomin.me/cron4s/userguide/index.html#parsing
- PHP Fatal error: cURL error 28: Connection time-out
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php.