/api_test

API test code

Primary LanguageJavaScript

api_test

Copied from My "Yahoo Open Hack Day" project. (2012 in Taiwan)

  1. ABBYY OCR SDK

    • file: abbyy_ocr.php
    • usage: abbyy_ocr($imgPath, $lang)
    • example: abbyy_ocr("@/tmp/x.png", 'English')
    • see Recognition Languages for $lang parameter
    • Good support for Chinese
  2. Online OCR API Service

    • file: ocr_api.php
    • usage: ocr_api($imgPath, $lang)
  3. Google Geocoding API

    • file: google_geocoding.php
    • usage: google_geocoding($addr, $lang)
  4. Yahoo Boss Geo - Place Spotter

    • file: yboss_place_spotter.php
    • usage: boss_place_spotter($content, $lang = 'en-US', $isHtml = false, $confidence = 8)
    • see Web Service Spec
    • it requires oauth.inc
  5. YQL

    • file: yql.php
    • usage: yql($query)
  6. PhantomJS - Screenshot script

    • file: phantomjs/screenshot.js
    • phantomjs screenshot.js $vh $vw $agent $url $imgPath
    • params:
      • $vh $vw - viewport height & width
      • $agent - browser user agent
      • $url - $url to screenshot
      • $imgPath - image save target