• (022) 8788 2588

Scraper utk menyimpan real time feeds ke database

 

Target web: https://www.indopremier.com/ipotstock/liveTradeWindowed.php

web tersebut di atas mendapatkan 'kiriman' real time feeds (dalam bentuk JSON data) dari https://www.indopremier.com/module/saham/include/livetrade-streaming.php

Real time feeds akan berjalan dgn jadwal berikut:

  1. Senin - Kamis: 9.15 - 12.15 dan 13.45 - 16.05
  2. Jumat: 9.15 - 11.45 dan 14.15 - 16.05

Scraper merupakan Javascript (pakai EventSource) yg ditulis dalam PHP.

Ketika dijalankan, scraper berfungsi untuk merekam, parsing real time feeds (server mengirimkan dalam bentuk JSON data), dan menyimpan ke dalam database MySQL localhost.

contoh JSON data:

id: 0
data: {"code":"13:31:53","data":{"Time":"13:31:53","TradeCommand":"0","SecurityCode":"SMBR","BoardCode":"RG","TradeNum":"000377613023","Price":"2420","Volume":44,"BuyerCode":"CS","BuyerType":"F","SellerCode":"LG","SellerType":"D","PrevPrice":"2400","TmpVar1":"000842681006","TmpVar2":"000842603483","Chg":"20","TmpVar4":"0","TmpVar5":"1\r","fmtPrice":"2,420 ","fmtChg":"20 ","fmtVolume":"44 ","fmtLabelSector":"basic"}}

Kolom pd tabel database localhost:

  1. Date (YYYY-MM-DD)
  2. Time
  3. TradeCommand
  4. SecurityCode
  5. BoardCode
  6. TradeNum
  7. Price
  8. Volume
  9. BuyerCode
  10. BuyerType
  11. SellerCode
  12. SellerType
  13. PrevPrice
  14. TmpVar1
  15. TmpVar2
  16. Chg
  17. TmpVar4
  18. TmpVar5
  19. fmtPrice
  20. fmtChg
  21. fmtVolume
  22. fmtLabelSector
Dalam PHP ada tombol "START" dan "STOP". START utk memulai aktivitas membangun koneksi, parsing, dan simpan data ke database. STOP utk menghentikan smua aktivitas tersebut.

Tampilan tidak penting. Buat sesederhana mungkin.

Budget <= Rp150.000

saya punya beberapa contoh javascript dalam PHP yg mungkin bs jd acuan dan selanjutnya dikembangkan sendiri. ada di attachment.

MySQL JavaScript PHP Web Scrapping

Project Class: Micro (Under 500rb)
Published Budget: Rp 150,000
Finish Days: 2
Published Date: 21/11/2016 14:57:52 WIB
Start Date:
Project Status: No Action
Accepted Worker:
Accepted Budget: Rp 0
Project Ending:
Finish Date:

Project Owner

tommytama
    
10.00/10.00
28 Point
#1,713 dari 84,978

Accepted Worker

Bid masih terbuka.

Place New Bid

  User Bids

appzone
    
9.82/10.00

stevevanchristie
    
9.33/10.00

ilmu13
    
0.00/10.00

azanakbar
    
0.00/10.00

Recommended Workers

bl4ck4nt

9,585 points
80 projects
    
9.19/10.00

Iswanto

5,799 points
138 projects
    
9.48/10.00

irvanseptian.com

4,397 points
23 projects
    
9.71/10.00

idlamalif

3,794 points
67 projects
    
9.85/10.00

RestuHerwanto

3,383 points
9 projects
    
9.33/10.00

Recommended Services

Pembuatan template website

Rp 300,000
7 sales
    
10.00/10.00

Pembuatan bot line

Rp 1,500,000
1 sales
    
10.00/10.00

Jasa Pembuatan Website Streaming Film

Rp 750,000
2 sales
    
9.00/10.00

Open Projects

Butuh Plugin Custom size Woocommerce

Open to SuggestionsOwner: Chandly
Deadline: 30 days

Butuh frontend website property (PHP)

Rp 700,000Owner: skovbjerk
Deadline: 7 days

Buat Website Online Shop Woocomerce Memakai Sistem Epeken

Open to SuggestionsOwner: Bp-Dody
Deadline: 7 days

OSClass rest-API

Open to SuggestionsOwner: charles11
Deadline: 7 days

Buat theme website = sederhana namun terlihat elegan (May)

Open to SuggestionsOwner: Best-owner
Deadline: 14 days