Web sitesinde verileri kapmak için nasıl?

6 Cevap php

Yani, sık sık, ben farklı numaralar için benim hesaplarını kontrol. Örneğin, benim bağlı hesapları: Ben nakit artışı kontrol edin.

Ben tüm bu web sitelerine giriş ve sonra benim için para değeri kapmak ve bir sayfada görüntüleyebilirsiniz bir komut dosyası programlamak istiyorum. Bunu nasıl programlayabilirsiniz?

6 Cevap

you should take a look into curl. You should be able to generate a script that retrieve some webpage easily.

Ayrıca simplexml içine bir göz atın ve dom, bu (X) HTML dosyalarından bilgi ayıklamak için yardımcı olacaktır.

Ayrıca Zend_Http kıvırmak için iyi bir alternatif olabilir.

Şerefe

Eh, tür belirsiz bir soru ... Ben aşağıdaki adımları öneririm:

  • POST aracılığıyla oturum açma bilgilerini göndermek
  • yakala ve yanıtı ayrıştırmak

  • İlgili tüm hesaplar / sitelerden istiyorsun onay için bunu

Eğer yüz varsa özel sorunları Bu yanıt üzerine yorum yapmaktan çekinmeyin

EDIT: Ben onun teknik yaklaşımı RageZ kabul ediyorum. Benim için de 'tercih silahı' olacağını kıvırmak ... ^ ^

hth

K

First of all, check if the services where you want to log in have APIs.
It's be much easier as that's a format specifically made for the purpose of getting the datas and exploiting them in an other application.

Bir API var ise, verileri almak ve nasıl kullanacağınızı görmek için bu belgelere bakabilirsiniz.

If there isn't any, you need to scrap the HTML pages.
You can start by taking a look at Curl : http://php.net/curl
The idea is to simulate your own visit of the website by sending the loggin post request and getting the given datas.

After retrieving the page's datas, you can parse them with tools like dom. http://php.net/dom

TestPlan, bir web otomasyon sistemi olarak tasarlanmış ve bu tür görevler çok basit hale getirir edildi kullanın.

I, PHP komut kullanmak kıvırmak daha samimi onun daha kullanıcı Eğer olsaydı ben gerçekten Snoopy içine bir göz olurdu. İşte bazı sample code olduğunu.

<?php
    /*
    You need the snoopy.class.php from 
    http://snoopy.sourceforge.net/
    */

    include("snoopy.class.php");

    $snoopy = new Snoopy;

    // need an proxy?:
    //$snoopy->proxy_host = "my.proxy.host";
    //$snoopy->proxy_port = "8080";

    // set browser and referer:
    $snoopy->agent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
    $snoopy->referer = "http://www.jonasjohn.de/";

    // set some cookies:
    $snoopy->cookies["SessionID"] = '238472834723489';
    $snoopy->cookies["favoriteColor"] = "blue";

    // set an raw-header:
    $snoopy->rawheaders["Pragma"] = "no-cache";

    // set some internal variables:
    $snoopy->maxredirs = 2;
    $snoopy->offsiteok = false;
    $snoopy->expandlinks = false;

    // set username and password (optional)
    //$snoopy->user = "joe";
    //$snoopy->pass = "bloe";

    // fetch the text of the website www.google.com:
    if($snoopy->fetchtext("http://www.google.com")){ 
        // other methods: fetch, fetchform, fetchlinks, submittext and submitlinks

        // response code:
        print "response code: ".$snoopy->response_code."<br/>\n";

        // print the headers:

        print "<b>Headers:</b><br/>";
        while(list($key,$val) = each($snoopy->headers)){
            print $key.": ".$val."<br/>\n";
        }

        print "<br/>\n";

        // print the texts of the website:
        print "<pre>".htmlspecialchars($snoopy->results)."</pre>\n";

    }
    else {
        print "Snoopy: error while fetching document: ".$snoopy->error."\n";
    }
?>

Vietspider Web Data Extractor kullanın.

Vietspider Web Data Extractor: Yazılım, Oracle, MySQL, SQL Server, H2 gibi RDBMS çeşitli destekler (Metin, CDATA) sonra ilişkisel database.Product saklamak XML standardına web siteleri (Data Kazıma), biçiminden veri süründüğü HSQL, Apache Derby Postgrees ... Vietspider Paletli, Session (form girişi ile giriş sorgu), çoklu indirme, JavaScript işleme, Proxy (ve otomatik tarafından çok vekil web sitesinden vekiller tarama) destekler ...

http://binhgiang.sourceforge.net indirin