Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

Accessing another URL for information

I've got a situation where I'm having to retrieve data from another server.

The page my user will access has on it a statement that says, "Look how we've helped our members thus far:" After the ":," there will be a number that represents the number of pounds their membership has lost that year.

That number will be computed using a database and script sitting on another server. Obviously it would be a slam dunk if I could put everything on the server my user is accessing, but that isn't the case, at least right now.

So, is there a way I could use a "GET" dynamic to retrieve the number I need?

Thoughts?
Avatar of Gary
Gary
Flag of Ireland image

If that is all that is on the page then just do an ajax call and strip (split) everything before ":,"
Plain ole js or jquery if you can.
SOLUTION
Avatar of DrDamnit
DrDamnit
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bruce Gust

ASKER

Doctor, I'm digging your suggestion and while I'm familiar with cURL as far as some of the ecommerce stuff I've done, I would welcome an example if you could provide one as well as an XML example of how that would work with what I'm trying to do.

Or, if there's an online tutorial, that would be great too.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Please post the URL of the foreign server.  I expect I can give you a tested and working code sample that will return the number.  Thanks, ~Ray
julianH has a great example already.

If you tell us what the data is / what it looks like, we'll be able to help you with even more.
Hey, guys!

Thanks for your time, one and all.

I was able to work around the problem in a way where I just displayed the data on a screen that was coming from the URL where the data was being stored. I'm award points to those who logged in and thank you so much!