get json using php

前端 未结 3 1738
遇见更好的自我
遇见更好的自我 2020-12-06 10:09

I need to get the json data from, http://vortaro.us.to/ajax/epo/eng/ + \'word\'+ \"/?callback=?\" working example (not enough reputation)

I know how to do it in jav

3条回答
  •  孤街浪徒
    2020-12-06 10:38

    Old question, but still one of the top hits in Google, so here is my contribution on top of @DrDol's answer.

    
    

    Note the user of the CURLOPT_RETURNTRANSFER which sends the response into the return value (and returns false on fail).

提交回复
热议问题