lundi 28 janvier 2019

web scraping from a dynamic table

I need to download data from this website (tables)in order to do statistical analysis. Can anyone help me? https://games.crossfit.com/leaderboard/open/2018?division=1&region=0&scaled=0&sort=0&occupation=0&page=1




Extract specific html values with php

I'm coding a web service which is taking data from various servers.

Currently I'm stuck on a service which does not provide a XML or json response. Just plain HTML.

After having correctly configured all curl requests, this is what I get (will place XXXXXXXXX on private information):

<!DOCTYPE html>
<html>
    <head>
       [...]
    </head>
    <body>
        [...]
        <div id="container">

            <div id="top">
                [...]
</div>
<div class="double-split"></div>            </div>
            <div class="header">
                <div class="header_top">
    <div class="prop_logo">
        <a href="http://www.codiceinverso.it/">
            <img class="banner_head" border="0" alt="CodiceInverso.it" src="http://www.codiceinverso.it/img/title.png">
        </a>        
    </div>

    <div class="prop_1">
        <form action="http://www.codiceinverso.it/search.php" id="cse-search-box">
  <div>
    <input type="hidden" name="cx" value="partner-pub-5079264506056694:4krgt-spv0m" />
    <input type="hidden" name="cof" value="FORID:10" />
    <input type="hidden" name="ie" value="ISO-8859-1" />
    <input type="text" name="q" size="40" />
    <input type="submit" name="sa" value="Cerca" />
  </div>
</form>
<script type="text/javascript" src="http://www.google.it/cse/brand?form=cse-search-box&amp;lang=it"></script>    </div>

    <!-- <div class="social">
        <span class="google">
            <g:plusone size="medium" href="http://www.codiceinverso.it/servizi/verifica-partita-iva.html"></g:plusone>
        </span>
        <span class="facebook">
            <iframe src="https://www.facebook.com/plugins/like.php?href=http://www.codiceinverso.it/servizi/verifica-partita-iva.html&amp;show_faces=false&amp;layout=button_count" scrolling="no" frameborder="0" style="height: 21px; width: 150px" allowTransparency="true"></iframe>
        </span>
    </div> -->
</div>
<div style="text-align: center; margin-top:15px; margin-bottom: 25px;">
        <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- cod_inv_header -->
    <ins class="adsbygoogle"
         style="display:inline-block;width:728px;height:90px"
         data-ad-client="ca-pub-5079264506056694" 
         data-ad-slot="4463705778"></ins>
    <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </div>

<div class="header-menu thisisfixed" rel="191">
    <div class="wrapper">
        <ul class="main-menu">
            
            <li style="background:#a21d1d;color:#a21d1d;">[...]
            </li>
            
            <li style="background:#6d8b13;color:#6d8b13;">[...]
            </li>

            
            
            <li style="background:#338aa6;color:#338aa6;"><a>Codici & Comuni<span> </span></a>
                <ul class="sub-menu">
  [...]
                </ul>
            </li>

            <li style="background:#4b4b4b;color:#4b4b4b;">[...]
            </li>
        </ul>
    </div>
</div>
            </div>
            <div id="main">
                <div id="content">
                                            <div class="wrapper_content">
                            <div class="top_content">
    <a href="http://www.codiceinverso.it/">
        TORNA ALLA HOMEPAGE
    </a>
</div>
<div class="title"><h1>Verifica la Partita IVA</h1></div>                <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDYK1Ql2jSXrghsZEmrTWdhHVqeECcTgLI&language=it"
        type="text/javascript">
</script>
</script>
<script type="text/javascript" src="http://www.codiceinverso.it/ajax/maps.js"></script>
<script type="text/javascript" src="http://www.codiceinverso.it/ajax/service.js"></script>

<div class="page">
              La Partita Iva <strong style="color:green">XXXXXXXXXXX</strong> risulta corretta!!<br>
          Matricola : <strong>XXXXXXXXX</strong> <br>
          Codice di controllo : <strong>XXXXXX </strong><br>
          Rilasciata dalla provincia di <strong>XXXXXXX</strong> <br>
          <br>
          Nome : <strong>XXXXXXXXXXXXXX</strong><br>
          Indirizzo : <strong>XXXXXXXXXXX
XXXXXXXXXXX
</strong><br><br>
          <a href="">Verifica un' altra Partita Iva</a>

                     </div>
<div class="page" style="margin-top: 15px;">
    <br />
    <h2>Che cos'&egrave; la Partita IVA ?</h2>
La <strong>Partita IVA</strong> &egrave; un codice di 11 cifre che viene rilasciato dall'ufficio dell'<strong>Agenzia Entrate</strong>.
Le prime 7 cifre indicano il numero di matricola che identifica il soggetto nell'ambito del distretto provinciale. Le successive 3 cifre
corrispondono invece generalmente al <strong>suffisso Istat</strong> della provincia. L'ultima cifra &egrave; un numero
di controllo che serve per verificare la correttezza della partita IVA. Per maggiori informazioni
    consultare la voce di Wikipedia <a target="_blank" href="http://it.wikipedia.org/wiki/Partita_Iva">Partita Iva</a>
</div>

    
        <div class="adsense_banner_bottom_all_page">
        [...]
    </div>
    
                        </div>
                                    </div>
            </div>
            <div id="extra">
                <div class="content-right">
    
        <div class="banner">
    
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- cod_inv_all_page_336x280 -->
    <ins class="adsbygoogle"
         style="display:inline-block;width:336px;height:280px"
         data-ad-client="ca-pub-5079264506056694" 
         data-ad-slot="1479886577"></ins>
    <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
        </div>
    <div class="separator"></div>
               [...]
    </div>

    <div class="facebook-container">
       [...]
    </div>



</div>


            </div>
            <div id="footer">
                <div class="line_footer"></div>
<div class="footer_text">
[...]
</div>            </div>
        </div>
        <script type="text/javascript">
           [...]
        </script>
    </body>
</html>

I need to get the XXXXXXXXXX values in php separate variables.

What's the easiest way to achieve this? I'm still learning to program web services and I would appreciate if someone can show me the right way to proceed.

Thanks a lot for Your time.

Luca




Can you become a professional web developer/programmer without reading any documentations? i really hate reading texts or other people's code

Can you become a professional web developer/programmer without reading any documentations? i really hate reading texts or other people's code..

is it possible to be a professional web developer only by watching videos and practicing algorithms?




How to tell the background architecture of a web page from source code?

How can I tell what is the background of a website by looking at the source code of the page?

Like, what is the architecture, which web framework was used and similar?

For example, is it PHP or Node.js on the server-side? Was it developed in ASP.NET? Which JS framework is it using?




dimanche 27 janvier 2019

Calling WCF service from another WCF service (routing)

i have WCF service (RootService) hosted on IIS on server. For example on port 5000. I need to call another service (AdvancedService), hosted on the same IIS on different port. For example on port 6000. There shouldn't be any problem with calling that.

I would like to ask for routing.

I will call RootService from any client. The request will do through internet. E.G. https://217.48.48.48:5000/RootService.svc. And then my RootService call AdvancedService by https://217.48.48.48:6000/AdvancedService.svc. Will be request routed through the internet, or just only through local network, server or just only IIS?

Thanks for your answer




what the best web Open Source Chatting system

what the best web Open Source Chatting system you give recommendation used angular 2 nodejs ?




how to create post_id for a new post in social website

I want to create id for the new post, such as 00001,00002, however, at the same time I need to retrieve the post_id to name the picture url xxx/00001_1.jpg. So should I implement it with mysql(auto_increment) or php/java api?