{"action":"created","issue":{"url":"https://api.github.com/repos/jansenfelipe/cpf-gratis/issues/13","repository_url":"https://api.github.com/repos/jansenfelipe/cpf-gratis","labels_url":"https://api.github.com/repos/jansenfelipe/cpf-gratis/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/jansenfelipe/cpf-gratis/issues/13/comments","events_url":"https://api.github.com/repos/jansenfelipe/cpf-gratis/issues/13/events","html_url":"https://github.com/jansenfelipe/cpf-gratis/issues/13","id":205032063,"number":13,"title":"Não consigo executar?","user":{"login":"tloriato","id":11580564,"avatar_url":"https://avatars.githubusercontent.com/u/11580564?v=3","gravatar_id":"","url":"https://api.github.com/users/tloriato","html_url":"https://github.com/tloriato","followers_url":"https://api.github.com/users/tloriato/followers","following_url":"https://api.github.com/users/tloriato/following{/other_user}","gists_url":"https://api.github.com/users/tloriato/gists{/gist_id}","starred_url":"https://api.github.com/users/tloriato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tloriato/subscriptions","organizations_url":"https://api.github.com/users/tloriato/orgs","repos_url":"https://api.github.com/users/tloriato/repos","events_url":"https://api.github.com/users/tloriato/events{/privacy}","received_events_url":"https://api.github.com/users/tloriato/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-02T23:45:38Z","updated_at":"2017-02-03T11:44:19Z","closed_at":null,"body":"Primeiramente gostaria de pedir desculpas pela Issue tão fútil, mas sou obrigado a reconhecer minhta total inaptidão em relação à php. Esclarecido isso:\r\n\r\n**Problema:** \r\nNão consigo reproduzir o captcha, a imagem vem sempre corrompida.\r\n![untitled](https://cloud.githubusercontent.com/assets/11580564/22573514/767c4d58-e990-11e6-85ca-e3604a31e866.png)\r\n\r\n**O que foi feito?**\r\n_Ubuntu 14.04_\r\n- Instalei o Apache e o PHP pelo terminal\r\n- Naveguei até /var/www/html\r\n- `$ composer require jansenfelipe/cpf-gratis`\r\n- Criei um arquivo index.php com o seguinte contéudo:\r\n```\r\n<html>\r\n <head>\r\n  <title>PHP Teste</title>\r\n </head>\r\n <body>\r\n<?php\r\nrequire_once '../vendor/autoload.php';\r\nuse JansenFelipe\\CpfGratis\\CpfGratis;\r\nif(isset($_POST['captcha']) && isset($_POST['cookie']) && isset($_POST['cpf']) && isset($_POST['data_nascimento'])){\r\n    $dados = CpfGratis::consulta($_POST['cpf'], $_POST['data_nascimento'], $_POST['captcha'], $_POST['cookie']);\r\n    var_dump($dados);\r\n    die;\r\n}else\r\n    $params = CpfGratis::getParams();\r\n?>\r\n\r\n<img src=\"<?php echo $params['captchaBase64'] ?>\" />\r\n\r\n<form method=\"POST\">\r\n    <input type=\"hidden\" name=\"cookie\" value=\"<?php echo $params['cookie'] ?>\" />\r\n    \r\n    <input type=\"text\" name=\"captcha\" placeholder=\"Captcha\" />\r\n    <input type=\"text\" name=\"cpf\" placeholder=\"CPF\" />\r\n    <input type=\"text\" name=\"data_nascimento\" placeholder=\"Nascimento (DDMMYYYY)\" />\r\n    \r\n    <button type=\"submit\">Consultar</button>\r\n</form>\r\n </body>\r\n</html>\r\n```\r\n- Acessei o `localhost`\r\n\r\n**Possíveis Causas:**\r\n- Eu\r\n\r\nVocê poderia me ajudar? Obrigado!"},"comment":{"url":"https://api.github.com/repos/jansenfelipe/cpf-gratis/issues/comments/277228597","html_url":"https://github.com/jansenfelipe/cpf-gratis/issues/13#issuecomment-277228597","issue_url":"https://api.github.com/repos/jansenfelipe/cpf-gratis/issues/13","id":277228597,"user":{"login":"jansenfelipe","id":3134214,"avatar_url":"https://avatars.githubusercontent.com/u/3134214?v=3","gravatar_id":"","url":"https://api.github.com/users/jansenfelipe","html_url":"https://github.com/jansenfelipe","followers_url":"https://api.github.com/users/jansenfelipe/followers","following_url":"https://api.github.com/users/jansenfelipe/following{/other_user}","gists_url":"https://api.github.com/users/jansenfelipe/gists{/gist_id}","starred_url":"https://api.github.com/users/jansenfelipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jansenfelipe/subscriptions","organizations_url":"https://api.github.com/users/jansenfelipe/orgs","repos_url":"https://api.github.com/users/jansenfelipe/repos","events_url":"https://api.github.com/users/jansenfelipe/events{/privacy}","received_events_url":"https://api.github.com/users/jansenfelipe/received_events","type":"User","site_admin":false},"created_at":"2017-02-03T11:44:19Z","updated_at":"2017-02-03T11:44:19Z","body":"Bom dia @tloriato ! Nenhuma mensagem de erro ou warning? Dá uma olhada nos logs, pois só com as informações que vc passou, não consigo te ajudar.\r\n\r\nA lib retorna uma string base64 que representa a imagem. Verifique o conteúdo de `$params['captchaBase64']`\r\n\r\n---\r\n#### Observação:\r\n\r\nUma outra forma para vc testar a library (e mais fácil, sem apache)\r\n\r\nFaça o clone do repositório em um diretório qualquer da sua máquina, acesse e execute um comando para iniciar o [servidor embutido no PHP](http://php.net/manual/en/features.commandline.webserver.php). \r\n\r\nSegue comandos:\r\n\r\n```shell\r\n$ git clone https://github.com/jansenfelipe/cpf-gratis.git\r\n$ cd cpf-gratis\r\n$ composer install\r\n$ php -S localhost:8000 -t example\r\n```\r\n\r\nDone! 😄 \r\n\r\n![screen shot 2017-02-03 at 09 43 05](https://cloud.githubusercontent.com/assets/3134214/22590074/adb0ed06-e9f4-11e6-8c6d-b7057aa96e5a.png)\r\n\r\n\r\n"}}
{"actor":{"display_login":"jansenfelipe"}}