Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

[ASK] Auto Login Forum Using CURL

General discussions related to php

Moderators: macek, egami, gesf

[ASK] Auto Login Forum Using CURL

Postby angelcyber942 » Sat May 04, 2013 9:30 am

hello , this is my forum

and i try to create auto login script

i already install tamper data add on in firefox

and i try to login in my forum and i get this url from tamper data

in the form i fill same for user and fuck for password and then i get this url from tamper data ... login&url=

and then i create CURL script the script is like this

Code: Select all
// URL login
$url = "";

// Username & Password
$user = "kampungan";
$pass = "angel123";
//$remember = "yes";

$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, "username=".$user."&password=".$pass."&submit=Login&action=do_login&url=");
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_TIMEOUT, 30);
curl_setopt($curlHandle, CURLOPT_POST, 1);

but i try these script and then try open my forum but i am not yet loged in...

so anyone please help me :D
New php-forum User
New php-forum User
Posts: 4
Joined: Sat May 04, 2013 9:14 am

Re: [ASK] Auto Login Forum Using CURL

Postby johnj » Mon May 13, 2013 2:37 am

what is the error that you are getting?
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Return to PHP General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.