Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <style type="text/css">
- body{
- color: #FFF;
- background-color: #000;
- }
- </style>
- </head>
- <body>
- <title>Web Scraping - CPCICAT_BOT</title>
- <?php
- ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3');
- $cantidad_center = (int) $cantidad_center;
- $listado = "http://www.cpcicat.org.ar/listado-de-matriculados.html"; // URL de donde obtengo los nombres e ids de los matriculados.
- $cupones = "http://www.cpcicat.org.ar/scripts/pagos/cupon.php?socio="; // URL donde hare la consulta de lo que adeudan.
- $codigo_fuente_listado = file_get_contents($listado);
- $codigo_fuente_listado = utf8_decode($codigo_fuente_listado);
- $quito_tag_tbody = explode('<tbody>',$codigo_fuente_listado);
- $quito_tag_tbody = explode('</tbody>',$quito_tag_tbody[1]);
- $ids_center = explode('<td style="text-align: center">', $quito_tag_tbody[0]);
- $cantidad_center = count($ids_center);
- $explode_tds = explode('</td><td>',$quito_tag_tbody[0]);
- $i=1;
- for($x=1;$x<270;$x++)
- {
- ob_flush();
- echo '<font color="#666">Nombre y Apellido:</font> '.$explode_tds[$x];
- $explode_limpia = explode('</td><td style="text-align: center">',$explode_tds[$x+1]);
- echo " ".$explode_limpia[0]." ";
- $x = $x+1;
- $adeuda = $cupones.$i;
- $fuente_deuda = file_get_contents($adeuda);
- $explodeo_deuda = explode('<form>',$fuente_deuda);
- $explodeo_deuda = explode('<select name="users" onchange="mostrarMonto('.$i.', this.value)">',$explodeo_deuda[1]);
- $explodeo_deuda = str_replace('Ud. adeuda','',$explodeo_deuda);
- echo '<font color="#666">Adeuda: </font>'.$explodeo_deuda[0]."<br>";
- $i++;
- flush();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement