-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathhttp_request.php
39 lines (35 loc) · 999 Bytes
/
http_request.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
$resultado = file_get_contents('http://172.18.40.9:10035/repositories/desaparecidos1/statements/query');
$resultado = nl2br("$resultado");
$matriz = explode('
', $resultado, -1);
$tam = sizeof($matriz);
///////////////////////////////////////
/*
// array novo
$vetor[0] = $matriz[0];
$i=1;
$j=0;
$count=1;
while (i<$tam){
vetor[j].=" ";
vetor[j].= $matriz[i];
for(int i=0; i<$tam; i++){
}
*/
////////////////////////////////////////////
echo"Quantidade de desaparecidos cadastrados: $tam </br>";
echo"Primeira pessoa cadastrada: </br>";
for($i=0; $i<26; $i++){
echo"$matriz[$i] </br>";
/////IDEIAS
/*
* Fazer consulta no allegro
* guardar a consulta numa variavel srting
* converter a string em Json object com funcao json_encode();
* decodificar o objeto json com a funçao json_decode()
* e usar o resto do código do Adriano do "virtuoso_query"
*/
}
//200.131.219.27:10035/catalogs/system/repositories/desaparecidos?query=select+%3Fa+%7B%3Fa+%3Fb+%3Fc%7D+limit+10
?>