Search in Clipping OAB

Asked

Viewed 144 times

3

There are several programs ( for lawyers) who read the cut of the OAB, the evolution of the process, automatically, bringing to it these changes daily.

The idea is to put inside a mini system of processes that we have inside the office, without having to enter the portal every time to consult. Do by the Lawyer Login data (OAB and UF) he pull on that Url the data pro dia.

He would consult by Url in OAB portals, by state, the cases that that lawyer has.

Someone has already made or has idea of how I can search this data, given the fact that it enters with the number of the process?

  • What data? Where are they, how are they formatted? What have you tried? Have any questions specific about this reading process? Please remember that this site is not a forum. If not yet, please read [help] and mainly [Ask]. :)

  • the doubt would really be this, what is the best way to get this data coming from another site, and I would be sending an array to automatically fill the fields in the portal of the OAB ( in case the registration of the OAB and the UF lawyer). I haven’t been tested yet because I don’t have a path to follow.

2 answers

1


Based on the URL that you passed in the comment .. I put this together, but I warn you: Their system occasionally displays the recaptcha of Google , and by that I mean that after they detected that I was using a bot to do the queries, all of them after came with the captcha. That said, it follows the code I used using Sean Huber’s Curl library that is available here.

<?php

require_once 'lib'.DIRECTORY_SEPARATOR.'curl.php';
require_once 'lib'.DIRECTORY_SEPARATOR.'curl_response.php';

$cookie = dirname(__FILE__).DIRECTORY_SEPARATOR."oab.txt";
$url = "http://www.trt9.jus.br/internet_base/processooabadvsel.do";
$oab = "123456";
$uf = "PR";
$post = "lookupCorrentePlc=&modoPlc=consultaPlc&indExcDetPlc=&ordenacaoPlc=&evento=F9-Pesquisar&oabAdv_Arg=".$oab."&ufOabAdv_Arg=".$uf;

// instancia a classe
$curl = new Curl;

// parâmetros
$curl->cookie_file = $cookie;
$curl->options['AUTOREFERER'] = true;

// consulta
$pegaCookie = $curl->get($url);

// parâmetros
$curl->cookie_file = $cookie;
$curl->options['AUTOREFERER'] = true;
$curl->referer = $url;
$pegaCookie = $curl->get($url, $post);

// verifica se não achou nada
$preg = preg_match("/Nenhum registro encontrado/i", $pegaCookie->body);
$recaptcha = preg_match("/g-recaptcha/i", $pegaCookie->body);

if($preg > 0) {
    $resultado = "Nenhum registro encontrado";
} else {
    if($recaptcha > 0) {
        $resultado = "Esbarrou no recaptcha";
    } else {
        $resultado = "Encontrou alguma coisa";
    }
}

echo $resultado;

I don’t know if you’ve seen this Recorte Digital, but on it I had no problem making Curl requests.

  • Very good this scheme. The idea is to put inside a mini system of processes that we have inside the office, without having to enter the portal every time to consult. Do by the Lawyer Login data (OAB and UF) he pull on that Url the data pro dia.

  • Want a tip? In this second link I put in the publication has a scheme that the lawyer registers and every day arrives in the email summary , kk ... My cousin’s a lawyer and he showed me how to work.

  • in this example you wrote above, because it is pointing to the Curl page?

  • @Leandroguilherme he is printing the content he has on the page, if you want to treat the content on the page , with the last variable available in the $result code you can do whatever is necessary..

  • I edited the answer. For considerations like "I hope I helped" or "just ask again if you have any questions" use the comments.

0

I searched what this OAB cutout is about and found out it’s a panel for a lawyer, right?

Being, it is possible to connect and explore everything within this panel with Curl.

This requires valid login data to enter the site and make this treatment creating your own tool for such fact, this, of course if it is not a crime, once you are entering a hive of bees, rsrs

I will leave here a simple and practical example of the use of Curl:

<?php
// cria uma nova instância
$ch = curl_init();

// configura as opções que o cURL espera ..
curl_setopt($ch, CURLOPT_URL, "http://www.google.com/"); // url para acesso
curl_setopt($ch, CURLOPT_HEADER, 0); // não retornar o cabeçalho

// executa a requisição
curl_exec($ch);

// fecha a conexão
curl_close($ch);

In this example it will print the google site on your page.

  • only oab and date are required for access, see: http://www.trt9.jus.br/internet_base/processooabadvsel.do

Browser other questions tagged

You are not signed in. Login or sign up in order to post.