M
M
misc12016-08-02 00:44:37
PHP
misc1, 2016-08-02 00:44:37

PHP or NodeJS to use for parser?

What javascript to use for the parser? The main criterion is that the parser must be fast. It mainly parses JSON, XML (RSS+Atom), Twitter (via API) and HTML (but do not forget about frequent HTTP requests and database queries).
As for libraries, NodeJS means:

  1. HTML - cheerio
  2. RSS+Atom - node-feedparser or node-parse-rss
  3. JSON - JSON.parse()
  4. Twitter - twit or node-twitter

For PHP:
  1. HTML - Simple HTML DOM (including PSR-7 implementations: php-simple-html-dom-parser and php-html-parser )
  2. RSS+Atom - rss-php
  3. JSON - json_decode()
  4. Twitter - twitter-api-php

If you can offer your more productive ones, etc. libraries or recommend some library from "or" - write

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
xmoonlight, 2016-08-02
@misc1

PHP7+ curl_multi_init

D
deadmemoras, 2016-08-02
@deadmemoras

Just imagine:
You have a blog written in java (using a framework of course) and you implement some simple functionality in php.
Here you have the same.
Both languages ​​are great if you write a pure parser (there will be nothing else) - you don't have to read my comment)

L
LightAir, 2016-08-11
@LightAir

I'd rather do it in PHP. As far as I know, the node has problems with mysql.
But with a caveat, I would do the back part in PHP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question