Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gostaria de exemplos em PHP #72

Open
imob-system opened this issue May 25, 2023 · 0 comments
Open

Gostaria de exemplos em PHP #72

imob-system opened this issue May 25, 2023 · 0 comments

Comments

@imob-system
Copy link

imob-system commented May 25, 2023

Olá amigos bom dia,
Estou no site lendo a documentação enquanto crio o arquivo para receber o POST.
No manual vem escrito "Todas as nossas requisições de integração de leads contém o header Authorization com informações"
Porém, quando acesso o "Validador de Endpoint de Leads" ele envia uma requisição sem esse "header Authorization"
Abaixo segue var_dump do que estou recebendo no $_SERVER

array(48) {
["PATH"]=> string(28) "/usr/local/bin:/usr/bin:/bin"
["TZ"]=> string(17) "America/Fortaleza"
["REDIRECT_HANDLER"]=> string(28) "application/x-httpd-ea-php73"
["REDIRECT_STATUS"]=> string(3) "200"
["UNIQUE_ID"]=> string(27) "ZG-8PfgQGUwjEMz1RvaSYAAAANU"
["SCRIPT_URL"]=> string(25) "/leads/leads_canalpro.php"
["SCRIPT_URI"]=> string(50) "https://gestaoimoveis.com/leads/leads_canalpro.php"
["HTTPS"]=> string(2) "on"
["SSL_TLS_SNI"]=> string(17) "gestaoimoveis.com"
["HTTP_HOST"]=> string(17) "gestaoimoveis.com"
["HTTP_SENTRY_TRACE"]=> string(51) "ec6be610ae30458c89996f8b08ac7734-a8bee10531b7b203-0"
["HTTP_BAGGAGE"]=> string(181) "sentry-trace_id=ec6be610ae30458c89996f8b08ac7734,sentry-environment=production,sentry-public_key=b08495ed81264769bf34936aeed17f7b,sentry-transaction=/sandbox/leads/send-a-lead-to-me"
["HTTP_USER_AGENT"]=> string(13) "inception-api"
["HTTP_ACCEPT_ENCODING"]=> string(13) "gzip, deflate"
["HTTP_ACCEPT"]=> string(16) "application/json"
["HTTP_CONNECTION"]=> string(10) "keep-alive"
["CONTENT_TYPE"]=> string(16) "application/json"
["CONTENT_LENGTH"]=> string(3) "359"
["HTTP_X_HTTPS"]=> string(1) "1"
["SERVER_SIGNATURE"]=> string(0) ""
["SERVER_SOFTWARE"]=> string(6) "Apache"
["SERVER_NAME"]=> string(17) "gestaoimoveis.com"
["SERVER_ADDR"]=> string(15) "162.240.208.140"
["SERVER_PORT"]=> string(3) "443"
["REMOTE_ADDR"]=> string(12) "35.173.9.239"
["DOCUMENT_ROOT"]=> string(32) "/home/imobsy06/gestaoimoveis.com"
["REQUEST_SCHEME"]=> string(5) "https"
["CONTEXT_PREFIX"]=> string(8) "/cgi-sys"
["CONTEXT_DOCUMENT_ROOT"]=> string(26) "/usr/local/cpanel/cgi-sys/"
["SERVER_ADMIN"]=> string(38) "webmaster@gestaoimoveis.imobsystem.com"
["SCRIPT_FILENAME"]=> string(57) "/home/imobsy06/gestaoimoveis.com/leads/leads_canalpro.php"
["REMOTE_PORT"]=> string(5) "37650"
["REDIRECT_URL"]=> string(25) "/leads/leads_canalpro.php"
["GATEWAY_INTERFACE"]=> string(7) "CGI/1.1"
["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1"
["REQUEST_METHOD"]=> string(4) "POST"
["QUERY_STRING"]=> string(0) ""
["REQUEST_URI"]=> string(25) "/leads/leads_canalpro.php"
["SCRIPT_NAME"]=> string(25) "/leads/leads_canalpro.php"
["ORIG_SCRIPT_FILENAME"]=> string(34) "/usr/local/cpanel/cgi-sys/ea-php73"
["ORIG_PATH_INFO"]=> string(25) "/leads/leads_canalpro.php"
["ORIG_PATH_TRANSLATED"]=> string(57) "/home/imobsy06/gestaoimoveis.com/leads/leads_canalpro.php"
["ORIG_SCRIPT_NAME"]=> string(17) "/cgi-sys/ea-php73"
["PHP_SELF"]=> string(25) "/leads/leads_canalpro.php"
["REQUEST_TIME_FLOAT"]=> float(1685044285.2176)
["REQUEST_TIME"]=> int(1685044285)
["argv"]=> array(0) { }
["argc"]=> int(0)
}

Eu coloquei que o token deveria ser AAAAAAAAAAAAAAAAAAAAA para ver se ficava em evidencia mas não acho em lugar nenhum.

Acho incrível ter exemplos de todos os jeitos menos PHP

Alguém consegue um script simples de como deve ser essa validação do token ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant