Skip to main content
não use tags desenecessárias; NÃO use Trecho de código (Stack Snippets) para PHP, leia: http://meta.pt.stackoverflow.com/q/2115/3635
Fonte Link
Syzoth
  • 100,5mil
  • 23
  • 169
  • 361

Estou tentando fazer login e retornar na tela o painel de um site porempore me e retornado um erro 405 Method Not Allowed405 Method Not Allowed como posso resolver isso ?

<?php



$email = '   ';

$senha = '  ';


$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://host.com/login');

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 

curl_setopt ($ch, CURLOPT_POST, 1);

curl_setopt ($ch, CURLOPT_POSTFIELDS, '_username=$email&_password=$senha');

curl_setopt($ch, CURLOPT_COOKIESESSION, true);

$store = curl_exec ($ch);

curl_setopt($ch, CURLOPT_URL, 'https://host.com/dashboard/');

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 

$prok =curl_exec($ch);

curl_close ($ch);

echo $prok;


?>

<?php



$email = '   ';

$senha = '  ';


$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://host.com/login');

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 

curl_setopt ($ch, CURLOPT_POST, 1);

curl_setopt ($ch, CURLOPT_POSTFIELDS, '_username=$email&_password=$senha');

curl_setopt($ch, CURLOPT_COOKIESESSION, true);

$store = curl_exec ($ch);

curl_setopt($ch, CURLOPT_URL, 'https://host.com/dashboard/');

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 

$prok =curl_exec($ch);

curl_close ($ch);

echo $prok;


?>

Estou tentando fazer login e retornar na tela o painel de um site porem e retornado um erro 405 Method Not Allowed como posso resolver isso ?

<?php



$email = '   ';

$senha = '  ';


$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://host.com/login');

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 

curl_setopt ($ch, CURLOPT_POST, 1);

curl_setopt ($ch, CURLOPT_POSTFIELDS, '_username=$email&_password=$senha');

curl_setopt($ch, CURLOPT_COOKIESESSION, true);

$store = curl_exec ($ch);

curl_setopt($ch, CURLOPT_URL, 'https://host.com/dashboard/');

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 

$prok =curl_exec($ch);

curl_close ($ch);

echo $prok;


?>

Estou tentando fazer login e retornar na tela o painel de um site pore me e retornado um erro 405 Method Not Allowed como posso resolver isso ?

<?php



$email = '   ';

$senha = '  ';


$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://host.com/login');

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 

curl_setopt ($ch, CURLOPT_POST, 1);

curl_setopt ($ch, CURLOPT_POSTFIELDS, '_username=$email&_password=$senha');

curl_setopt($ch, CURLOPT_COOKIESESSION, true);

$store = curl_exec ($ch);

curl_setopt($ch, CURLOPT_URL, 'https://host.com/dashboard/');

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 

$prok =curl_exec($ch);

curl_close ($ch);

echo $prok;


?>
Fonte Link

erro 405 Method Not Allowed

Estou tentando fazer login e retornar na tela o painel de um site porem e retornado um erro 405 Method Not Allowed como posso resolver isso ?

<?php



$email = '   ';

$senha = '  ';


$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://host.com/login');

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 

curl_setopt ($ch, CURLOPT_POST, 1);

curl_setopt ($ch, CURLOPT_POSTFIELDS, '_username=$email&_password=$senha');

curl_setopt($ch, CURLOPT_COOKIESESSION, true);

$store = curl_exec ($ch);

curl_setopt($ch, CURLOPT_URL, 'https://host.com/dashboard/');

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 

$prok =curl_exec($ch);

curl_close ($ch);

echo $prok;


?>