• 17-02-2013, 00:29:41
    #1
    http://www.lme.com/ ana sayfadaki
    Copper değerindeki miktarı çekmem lazım.
    Güncelleme yaptıklarından eski kod çalışmıyor.



    Eski kod:

    <?php
    $oku = file_get_contents("http://www.lme.com/copper.asp");

    $bol = explode('<td align="center" valign="Cash Buyer">', $oku);
    $bol = explode('</td>', $bol[1]);
    echo $bol[0];
    ?>
  • 17-02-2013, 02:25:18
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    neresi tam olarak price değeri nerde
  • 17-02-2013, 17:02:34
    #3
    Sayfayı kaldırmışlar malesef
  • 18-02-2013, 11:50:57
    #4
    http://www.lme.com/ ana sayfadaki
    Copper değerinde yazıyor. Siteyi yeniden güncellemişler sanırım.
  • 18-02-2013, 18:16:06
    #5
    Listedeki sayı değerini mi çekmek istiyorsunuz?
  • 18-02-2013, 19:27:02
    #6
    A.s. umarım doğru değeri çekmişimdir
    <?php
    $oku = file_get_contents("http://www.lme.com/metals/non-ferrous/copper/");
    
    $bol = explode('Cash Seller & Settlement', $oku);
    $bol = explode('</tr>', $bol[1]);
    $yaz = $bol[0];
    $yaz = str_replace("<td>","",$yaz);
    $yaz = str_replace("</td>","",$yaz);
    echo $yaz;
    ?>
  • 18-02-2013, 23:57:45
    #7
    <?php
    
    $site = file_get_contents("http://www.lme.com/");
    
    $site = explode(' <table cellpadding="0" cellspacing="0" id="MD_current_official_prices_aluminium">
                <caption>
                    (US$/tonne) for
                    15 February 2013</caption>
                <colgroup>
                    <col width="40%" />
                    <col />
                </colgroup>
                <thead>
                    <tr>
                        <th>
                        </th>
                        <th scope="col">
                            <a href="/en-gb/pricing-and-data/pricing/official-price/">Official price</a>
                        </th>
                    </tr>
                </thead>
                
                        <tbody>
                
                    <tr>
                        <th scope="row"><a href="/en-gb/metals/non-ferrous/aluminium/">Aluminium</a></th>
                        <td>2,123.00</td>
                    </tr>
                
                    <tr>
                        <th scope="row"><a href="/en-gb/metals/non-ferrous/aluminium-alloy/">Aluminium alloy</a></th>
                        <td>1,900.00</td>
                    </tr>
                
                    <tr>
                        <th scope="row"><a href="/en-gb/metals/minor-metals/cobalt/">Cobalt</a></th>
                        <td>25,400.00</td>
                    </tr>
                
                    <tr>
                        <th scope="row"><a href="/en-gb/metals/non-ferrous/copper/">Copper</a></th>
                        <td>',$site);
    $site = explode('</td>',$site[1]);
    echo $site[0];
                
    ?>
  • 19-02-2013, 00:33:02
    #8
    XYZ
    Kimlik doğrulama veya yönetimden onay bekliyor.
    $url=file_get_contents('http://www.lme.com/');
    preg_match_all("'Copper</a></th>\s*<td>(.*?)</td>'si", $url, $veriler);
    echo $veriler[1][0];