Code Monkey home page Code Monkey logo

php-curl-automaticcookiemanager's Introduction

php-curl-AutomaticCookieManager

Simple PHP-Curl request response class for automatic cookie & refferer tracking without any development.

Examples And Results

PHP Code

	$request = new Request();
	$request->head('https://www.aaa.com/index');

	$request = new Request();
	$request->xmlHttpRequest();
	$request->setContentType('application/x-www-form-urlencoded; charset=UTF-8');
	$request->post('https://www.aaa.com/login', [
		'username' => 'test',
		'password' => 'test'
	]);
	$request->setCookie('NSC_IUUQT-XXX.USFOEZPM.DPN', 'changed');

	$request = new Request();
	$request->get('https://www.aaa.com/index');

Network Traffic

> HEAD /index HTTP/1.1
> Host: www.aaa.com
> Accept: */*

< HTTP/1.1 200 OK
< Cache-Control: private
< Content-Length: 514645
< Content-Type: text/html; charset=utf-8
< Date: Sat, 29 Oct 2016 15:16:36 GMT
< Set-Cookie: NSC_IUUQT-XXX.USFOEZPM.DPN=ffffffff0908146445525d5f4f58455e445a4a42378b;path=/


> POST /login HTTP/1.1
> Host: www.aaa.com
> Accept: */*
> Cookie: NSC_IUUQT-XXX.USFOEZPM.DPN=ffffffff0908146445525d5f4f58455e445a4a42378b;
> X-Requested-With: XMLHttpRequest
> Content-Type: application/x-www-form-urlencoded; charset=UTF-8
> Referer: https://www.aaa.com/inedx
> Content-Length: 206

< HTTP/1.1 200 OK
< Cache-Control: private
< Content-Type: application/x-javascript; charset=utf-8
< Set-Cookie: SH=x=COOKIE_&pp=ItMm4t5HRy+PG0lVAIiFr6/xslY=&tx=mqeBMUEemR+CB9vIkC5iMa6+zgk=; domain=aaa.com; expires=Sat, 05-Nov-2016 1$
< Set-Cookie: VisitorTypeStatus=visitor; domain=aaa.com; path=/


> GET /index HTTP/1.1
> Host: www.aaa.com
> Accept: */*
> Cookie: SH=x=COOKIE_&pp=ItMm4t5HRy+PG0lVAIiFr6/xslY=&tx=mqeBMUEemR+CB9vIkC5iMa6+zgk=;VisitorTypeStatus=visitor;NSC_IUUQT-XXX.USFOEZPM.DPN=changed;
> Referer: https://www.aaa.com/login
...

php-curl-automaticcookiemanager's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

5l1v3r1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.