Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8644503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:18:34+00:00 2026-06-12T12:18:34+00:00

I have an API I want to go out to. In a web browser

  • 0

I have an API I want to go out to. In a web browser I can return this:

{"files":[{"number":0,"timestamp":1349507580,"time":"20121006071300"},
{"number":1,"timestamp":1349506980,"time":"20121006070300"},
{"number":2,"timestamp":1349506320,"time":"20121006065200"},
{"number":3,"timestamp":1349505720,"time":"20121006064200"},
{"number":12,"timestamp":1349499120,"time":"20121006045200"},
{"number":99,"timestamp":1349446920,"time":"20121005142200"}]}

The server refuses to wrap this like this:

callback( ABOVE DATA )

I have tried to create a php proxy on my localhost to return jsonp data and a callback function but it is not working correctly.

What would be the minimum php code to return the correct jsonp data?

Also what single line of jQuery using ($.ajax ) would be needed to at least output this using alert?

I am only trying to get this to work, which I cannot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:18:35+00:00Added an answer on June 12, 2026 at 12:18 pm

    If you made a proxy, then there will not be a cross domain problem. You don’t need to use jsonp, just get the json data and then echo it.

    header('Content-type: application/json');
    echo file_get_contents($api_uri);
    exit;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a free web site that streams real-time stock-options data. I want to
I have done a lot of research and I can't work out if this
i have a backbone.js api i want to use in an ExtJS app. Extjs
I want to display google map in Android ,i have map API even map
I have a dynamic map in Google Maps (API v2) I want to overlay
I have written an API Bundle and some implementing services. Now i want to
Do we have similar windows API of DebugBreak in Unix/ Linux. I want to
I have several GWT Maps API JavaScriptObjects (LatLng, Polyline) which I want to send
I have a Facebook Fan API on my site, I want to style it
So I want to use funkload to stress test an API. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.