Jump to content

Receiving live feed.....


unplugged_web

Recommended Posts

I wonder if somebody could help me please. I have a live feed coming from a site and need to take certain info from that and have it displayed live on the site. I've been told that the information can't be sent to an address that is not ready to receive it, but I'm not sure what to do to make it ready. The feed looks like this:www.xxx.com/feed1=xxxx,feed2=xxxx,feed3=xxxx,feed4=xxxx,feed5=xxxxxxxxxxxxxxWhat I need to do is that the feed1, feed2, etc results and add them to an xml file (or even text) so that the site can then display them, but this is what I'm not sure about.Thanks in advance for your help.

Link to comment
Share on other sites

I'm not quite sure I understand, are you given a URL in that format and you want to break it up to list the different feeds?
Yep that is exactly it. When the url is sent I want to take the info out and display it in a web page. So one area shows feed1, another shows feed2 etc.
Link to comment
Share on other sites

If the URL follows that specific format, and there aren't any slashes in the feed values, then one option would be to use strrpos to find the last slash, then use substr to get everything after that slash (the list of feeds), then use explode to break up the comma list into an array. Then you can loop through the array and get the value for each feed. If the feed values have slashes in them, then you could use strpos instead of strrpos to find the domain plus the final slash, then use substr and explode after that.You could also give that to parse_url and see what it does with it, I'm not real sure what it would return for a format like that.

Link to comment
Share on other sites

If the URL follows that specific format, and there aren't any slashes in the feed values, then one option would be to use strrpos to find the last slash, then use substr to get everything after that slash (the list of feeds), then use explode to break up the comma list into an array. Then you can loop through the array and get the value for each feed. If the feed values have slashes in them, then you could use strpos instead of strrpos to find the domain plus the final slash, then use substr and explode after that.You could also give that to parse_url and see what it does with it, I'm not real sure what it would return for a format like that.
Great thanks, I'll have a look at doing that. One other question though, is it possible to return an 'okay' to the sender to let them know I got the feed okay?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...