PHP Curl spoofed IP Origination example

Source: Internet
Author: User
PHP Curl Forgery IP Source Example
PHP Curl is too powerful, it can not only imitate the user login, but also can imitate the user IP address Oh, for the forgery of IP source.

Curl makes the requested file fake_ip.php:
 
  


The requested target file target_ip.php:
 
  


The IP print order in the target file target_ip is the IP acquisition order of many open source systems at present.
Visit fake_ip.php and see the results:
58.68.44.61
58.68.44.61
127.0.0.1
Instance
Curl is really tough and can forge IP and source.
1.php request 2.php.

1.php Code:


2.php Code:
function Getclientip () {if (!empty ($_server["Http_client_ip")) $ip = $_server["Http_client_ip"]; else if (!empty ($_ server["Http_x_forwarded_for"]) $ip = $_server["Http_x_forwarded_for"]; else if (!empty ($_server["REMOTE_ADDR")) $ip = $_server["REMOTE_ADDR"]; else//Www.jbxue.com$ip = "err"; return $IP; } echo "IP:". Getclientip (). ""; echo "Referer:". $_server["Http_referer"];


Forgery success, this is not to "brush ticket" friends provide a good solution for IP
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.