ph2.js - URL scrapping/not global variables