Skip to content

dr4gun0v/essence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🔥 ESSENCE - PHP Lib for Web Requests

Essence Preview

GitHub repo size GitHub language count GitHub forks


The lib main goal is to easily make requests with PHP without using native curl, created specifically to one-line requests.



☕ How to use Essence

🇺🇸 To use Essence you need to add the require inside your main code

require __DIR__."/essence.php";



🚀 Documentation

Function Description
(new essence(string $link))->functions... Core to other functions
header(["User-Agent: ...", "Host: ..."]) Add header
cookies(bool $cookies) List all cookies returned on a cookie.txt file
connectTimeOut(bool $connect) Connection errors
verifySsl(bool $verify) Verify SSL
resolve() Domain Resolve
ipv4(bool $ipv4) IPV4 Resolve
emptyEncoding(bool $empty) Define the encoding null, accepting any type
verbose(bool $verbose) Verbose Mode
maxRedirects(int $max) Max number of redirects in a request
proxy(string $proxy, string $proxyusr = "root", string $proxypss = "root") Add Proxy (HTTP/HTTPS)

At the end of each request use:

Function Description
get(array $get=[]) Create a GET request with the parameters in a list
post(array $fields=[]) Create a POST request with the fields in a list



💻 Examples

GET Request with Proxy

echo (new essence("http://meuip.com/"))->header(["User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0"])->cookies()->verifySsl()->proxy("201.49.72.226:8080")->resolve()->ipv4()->emptyEncoding()->get();

GET Request

echo (new essence("http://meuip.com/"))->header(["User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0"m "Host: meuip.com"])->cookies()->ipv4()->emptyEncoding()->get(["test"=> "test");

POST Request

echo (new essence("http://meuip.com/"))->post(["test"=> "test"]);

Releases

No releases published

Packages

No packages published

Languages