, about Curl Simulation landing

Source: Internet
Author: User
Master in, about curl simulation landing
This post was last edited by dz215136304 on 2013-04-04 10:25:43

Simulated landing weaving dream, version 5.7, has removed the background verification code, do not know why has not been logged on (prompt login success but also jump back to the landing address)

$cookie _file = tempnam ('./temp ', ' Cookie ');
$login _url = ' http://localhost/dedecms/dede/login.php ';
$post _fields = ' gotopage=%2fdedecms%2fdede%2findex.php&dopost=login&adminstyle=newdedecms& Userid=admin&pwd=123456&sm1= ';

$ch = Curl_init ($login _url);
curl_setopt ($ch, Curlopt_header, 0);
curl_setopt ($ch, curlopt_returntransfer,0);
curl_setopt ($ch, Curlopt_post, 1);
curl_setopt ($ch, Curlopt_postfields, $post _fields);
curl_setopt ($ch, Curlopt_cookiejar, $cookie _file);
Curl_exec ($ch);
Curl_close ($ch);

$url = ' http://localhost/dedecms/dede/article_add.php?channelid=1 ';
$ch = Curl_init ($url);
curl_setopt ($ch, Curlopt_header, 0);
curl_setopt ($ch, Curlopt_returntransfer, 0);
curl_setopt ($ch, Curlopt_cookiefile, $cookie _file);
$contents = curl_exec ($ch);

Curl_close ($ch);

Share to:

Dede Landing class made a limit
  • 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.