phpWhois installation problem

Published 1 year ago by czaker

Hi guys,

I am pretty new with Laravel so please be patient with me :)

I want to use with my project and I have problems with install process.

I've added "phpwhois/phpwhois": "~4.0" to my composer.json and I don't know what next, probably add something to providers in app.php? but how can I figure out what should I add there?

If you could just point me in the right direction I would be great.

Thanks, Czaker

1 year ago (211,050 XP)

Did you actually install it with composer or just add it to the file?


@zachleigh Yes I used "composer update" after adding it to json and I have it in vendor folder.

1 year ago (211,050 XP)

So you can use the class in your project then.

use phpWhois\Whois;

$whois = new Whois();
$query = '';
$result = $whois->lookup($query,false);
echo "<pre>";
echo "</pre>";

@zachleigh I wish but there is an error: "(1/1) FatalErrorException Class 'phpWhois\Whois' not found"

I found this but it is not working either:

This error is on the line where I call "$whois = new Whois();"

Any ideas?

1 year ago (211,050 XP)

Couldnt get it to work here either. I think that package is dead. Maybe try this one:


When I try to add it to composer I get this:

Your requirements could not be resolved to an installable set of packages.

Problem 1
    - The requested package phois/whois ~1.0 exists as phois/whois[dev-master] but these are rejected by your constraint.

I tried by adding "phois/whois": "~1.0" to require in my composer.json

@zachleigh Thanks for help!

Please sign in or create an account to participate in this conversation.