So I finally figured out how to stream radio to my phone. More specifically 1.FM radio. The problem came with the fact that 1.FM uses MMS to stream their radio which would work on most non-java smartphones. Unfortunately I have a u740 Java phone and so it doesn’t work.

So after about 6 months of sporatic work, I finally figured it out. I had to use VLC as a encoder to tranform the MMS stream to a mp4-latm RTP stream. After that, then use Darwin Streaming Server to take the RTP stream from VLC and broadcast it using the RTSP protocol.

So yea, now I can rock away and tell my cell company to take that 7.00/month radio package and shove it.

Next Article
R.

Regex and Anchor tags

I had been looking on the Internet for a solution to a program I had be working on and sadly didn’t come up with one. I was trying to find a way to use regular expressions to find all the html anchor tags in a string along with matching a wild card URL (ie: secnem.com.*test.html). And after many hours of thrusting my head into my keyboard I came up with:

/<a [^><]*href=[\”\’][^\”\’><]*<rule>[^\”\’><]*[\”\’][^>]*>\s*.*\s*<\/a>/iU

You’d replace <rule> with what ever url rule you want, except for any wild cards in the url I needed to use [^\”\’><]* instead of just .* . This would prevent it from matching outside of the anchor. Bascially [^\”\’><]*  means: match any character except a double quote, single quote, greater than sign, or less than sign. All of which should not be in the href field to begin with.

If you wanted to see what the content of the anchor tag was or the matched href, simply put some brackets around like so:

/<a [^><]*href=[\”\’]([^\”\’><]*<rule>[^\”\’><]*)[\”\’][^>]*>(\s*.*\s*)<\/a>/iU

Hope this helps someone. You can of course adapt this to other html tags by replacing ‘a’ for ‘table’ or w/e. Same with the href. larsolavtorvik.com has a great resource for testing regex in real time and addedbytes.com has a great cheat sheet as well.

O.

Oops… they did it again.

Well it seems my faithful cell provider sadly broke the Internet on their cellular network  again*sigh*. I’m referring back to the previous problem I had with accessing any streaming services on the mobile browser on my Samsung u740 about a year or so ago. They eventually fixed the previous problem after about 1-2 months of me acquiring the phone and reporting the problem. This time around however they’re blaming it on their recent separation from a sister company and that they no longer support streaming on their network. Of course after mowing through several Customer Service Monkeys I eventually discovered that they no longer support their paid streaming, which I could care less about. But the fact that I cannot access current streaming services on the Internet is in fact a problem on their network, but not that they don’t support streaming. At any rate, I was finally able to submit a ticket to their data analysts about a week ago… still no response.