Old 26th February 2008, 08:49   #1
daedge
Junior Member
 
Join Date: Oct 2006
Posts: 11
php listener script for iphone

hi,

Php listener is script for iphone in php which plays mp3 stream from the shoutcast directory. Just wrote it since i was having problem with iradio on new firmware 1.1.3. The script uses iui as front end. The script is buggy and is not in any way complete. Just wanted to share it and see if its any good to improve it or just end it here..

Installation:

install php 5.2 from the installer app
install the lighttpd from installer app
copy the lighthttpd.conf file to /usr/local/etc

move the contents of listener folder to your site folder or document root for your server which is /private/var/root/Sites

just reboot your iphone and open safari to this address

http://127.0.0.1/

Current issues:

can only play shoutcast mp3 streams
since i was in hurry to post i just wrote it for top 500 stream in the shoutcast directory
other miscellaneous issues from a alpha, prototype or what ever you like calling it..
Attached Files
File Type: zip php listener.zip (29.2 KB, 1098 views)
daedge is offline   Reply With Quote
Old 26th February 2008, 22:05   #2
Wavestreaming
Major Dude
 
Wavestreaming's Avatar
 
Join Date: Apr 2004
Location: United Kingdom
Posts: 1,563
Send a message via AIM to Wavestreaming Send a message via Yahoo to Wavestreaming
Looks great
Wavestreaming is offline   Reply With Quote
Old 28th February 2008, 04:58   #3
kxuna
Junior Member
 
Join Date: Feb 2008
Posts: 3
could you explain a little more

how do you move the folders around on your iphone. I downloaded both apps but then got stuck on moving files so i did research and found brickr & iphonebrowser that might enable this. Is this what you used, could you explain a little more the process? THANX
kxuna is offline   Reply With Quote
Old 28th February 2008, 08:04   #4
daedge
Junior Member
 
Join Date: Oct 2006
Posts: 11
here is a updated version which loads faster fractionally or so i think and fixed a issue with windows shoucast servers.







Attached Files
File Type: zip php listenerv0.0.2.zip (35.3 KB, 833 views)
daedge is offline   Reply With Quote
Old 28th February 2008, 08:10   #5
daedge
Junior Member
 
Join Date: Oct 2006
Posts: 11
Re: could you explain a little more

Quote:
Originally posted by kxuna
how do you move the folders around on your iphone. I downloaded both apps but then got stuck on moving files so i did research and found brickr & iphonebrowser that might enable this. Is this what you used, could you explain a little more the process? THANX
i use winscp for log in to iphone via openssh.

Install open ssh from the installer app on iphone first and then reboot wait 30 secs and use winscp(google it) or http://winscp.net/eng/index.php

get it from there. Your default username is root and password alpine if you are using latest firmware. All my paths are from root folder so you might need to move few directories out since winscp logs you into default user directory and not root directory.
daedge is offline   Reply With Quote
Old 28th February 2008, 18:14   #6
kxuna
Junior Member
 
Join Date: Feb 2008
Posts: 3
Thanx a million.
kxuna is offline   Reply With Quote
Old 29th February 2008, 05:51   #7
daedge
Junior Member
 
Join Date: Oct 2006
Posts: 11
welcome. Let me know if it works or you think its complete crap and i should ditch it and find something else useful.
daedge is offline   Reply With Quote
Old 3rd March 2008, 00:03   #8
p_2_
Junior Member
 
Join Date: Dec 2001
Posts: 17
Send a message via AIM to p_2_ Send a message via Yahoo to p_2_
Great work! This is a great replacement for iRadio, I can go to a bookmark to listen to my station now on my iPhone.

Thanks!
p_2_ is offline   Reply With Quote
Old 9th April 2008, 19:23   #9
rogreu
Junior Member
 
Join Date: Apr 2008
Posts: 1
Hello love the idea of your php listenerv0.0.2. Got everything installed just can not figure out how to get it load. I get to this point: just reboot your iphone and open safari to this address URL submitted by user. and the URL does not show up. What do you type in the Safari browser to start the PHP? Thanks
rogreu is offline   Reply With Quote
Old 10th April 2008, 00:15   #10
daedge
Junior Member
 
Join Date: Oct 2006
Posts: 11
url in safari is ht*p://127.0.0.1/
ht*p://127.0.0.1/php.php to see if your php installation was successfull.
daedge is offline   Reply With Quote
Old 19th April 2008, 03:47   #11
eli1981
Junior Member
 
Join Date: Feb 2006
Posts: 6
First, i'd like to comment that i find your find/hack VERY useful, cause iRadio takes lots of cpu time out of the iPhone, and i looked for something lighter for a long time.

Is there any way of editing the top 500 stations to our favourite shoutcast stations? if Yes, please explain how.

Thanks alot!

-eli1981
eli1981 is offline   Reply With Quote
Old 19th April 2008, 18:13   #12
daedge
Junior Member
 
Join Date: Oct 2006
Posts: 11
i think load.php is the one to fetch the radio stations. And i just saw that in my hurry i forgot to change the ports for fsockopen for shoutcast servers other than port 80. If you have a certain request let me know more about it and maybe i can help such as custom radio stations or maybe saved playlist. Since iphone sdk is released and more apps will be coming in june i sort of think php radio will be extinct and thats why i have not updated it with all the fixes.
daedge is offline   Reply With Quote
Old 20th April 2008, 02:29   #13
eli1981
Junior Member
 
Join Date: Feb 2006
Posts: 6
I've managed last night to track the url i needed to write so i manually wrote myself the url of each shoutcast server of my fav station and bookmarked it after, maybe a lame solution but it worked

If you won't mind making a list of customed list (or showing me how i can make one) to use with this iui UI i'd really appreciate it.

cheers

Eli
eli1981 is offline   Reply With Quote
Old 3rd May 2008, 06:40   #14
pyrates
Junior Member
 
Join Date: May 2008
Posts: 1
Ok here is how you can do it, and it's simple. There's an app called MNPlight. That will allow you to enter in custom shoutcast url's and it works. Just install it, launch it, go to Radio, and add the custom url. Simple as that
pyrates is offline   Reply With Quote
Old 9th May 2008, 19:09   #15
lawrence123
Junior Member
 
Join Date: May 2008
Posts: 1
Error Messages

Hello,

I've installed all the above but when I click on top 500 stations the response is 500 - Internal Server Error or 403 Forbidden (403 Forbidden disappeared when I overwrote the lighttpd.conf file in iphone). What am I doing wrong? Below I've attached error log file message:

2008-05-09 19:01:53: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory

Many thanks for help

David
lawrence123 is offline   Reply With Quote
Old 10th May 2008, 04:49   #16
daedge
Junior Member
 
Join Date: Oct 2006
Posts: 11
using winscp or any other utility you are comfortable with check that php is installed in the above mentioned folder first. Its been long time since i updated my phone so may be the php package now installs to a different location.

Other thing to check will be the file permissions on on php-cgi. Right click and go to permissions and change it to 755.
daedge is offline   Reply With Quote
Old 11th May 2009, 20:38   #17
tj3182
Junior Member
 
Join Date: May 2009
Posts: 10
tutorial or readme?

Is there any tutorial to help config the php listenr on my server?

all i did was copy all of those files to my server, but im assuming i have to do something else..

Im getting this error "Sorry Content could not be loaded. Please try again later"

I have a .pls stream i need to be able to access on the iphone

Thank you in advanced!!!
tj3182 is offline   Reply With Quote
Old 11th May 2009, 22:10   #18
Greg_E
Major Dude
 
Join Date: Nov 2006
Location: USA
Posts: 1,687
Have you tried the free Winamp iphone player? As long as your stream is mp3 it should work. If aac+ then there is a $9.00 app that plays these streams called Tuner2. Both from the app store.

Your mileage may vary!
Greg_E is offline   Reply With Quote
Old 11th May 2009, 22:29   #19
tj3182
Junior Member
 
Join Date: May 2009
Posts: 10
i dont want an external app... i want to have a link on my mobile iphone site to link to the stream which would play in quicktime
tj3182 is offline   Reply With Quote
Old 12th May 2009, 02:28   #20
Greg_E
Major Dude
 
Join Date: Nov 2006
Location: USA
Posts: 1,687
I'm not sure you can do that because I don't think that Quicktime understands the audio streams correctly on the iphone. Since it is off topic I'll address me ideas in your other thread.

Your mileage may vary!
Greg_E is offline   Reply With Quote
Old 12th May 2009, 02:47   #21
tj3182
Junior Member
 
Join Date: May 2009
Posts: 10
ok but does the php listener trick the iphone to play in quicktime?
tj3182 is offline   Reply With Quote
Old 12th May 2009, 05:29   #22
daedge
Junior Member
 
Join Date: Oct 2006
Posts: 11
yes it does trick the iphone into believing as if its serving a mp3 file from local source but its just streaming it of a webserver or shoutcast server. This script is Outdated and i personally use the application.

This script resides on your iphone not on the website. Yes iphone can be fooled to use quicktime to play shoutcast using script but the script has to be running continuously on webserver which your host may not like and may cause high cpu usage if you have lot of listeners.

I have seen many radio sites actually using different servers just to stream radio to iphone eg: open somafm.com in your iphone and you will see what i mean.
daedge is offline   Reply With Quote
Old 12th May 2009, 05:51   #23
daedge
Junior Member
 
Join Date: Oct 2006
Posts: 11
i.somafm.com:6060 has shoutcast running 1.9.9
SHOUTcast Server Version 1.9.9delta/Linux

which supports iphone by pointing it directly to url of server and not the pls file. I am not aware of how to actually get hold of this version might want to ask shoutcast admins about it.
daedge is offline   Reply With Quote
Old 12th May 2009, 14:53   #24
Greg_E
Major Dude
 
Join Date: Nov 2006
Location: USA
Posts: 1,687
Yes the sometimes mentioned but not available SC 1.9.9

Too bad SC2 has been temporarily (hopefully) derailed.

Your mileage may vary!
Greg_E is offline   Reply With Quote
Old 12th May 2009, 16:04   #25
tj3182
Junior Member
 
Join Date: May 2009
Posts: 10
THANK YOU... now im trying to get my hosting company to upgrade my Shoutcast Server from 1.9.8 to 1.9.9
tj3182 is offline   Reply With Quote
Old 12th May 2009, 17:47   #26
Greg_E
Major Dude
 
Join Date: Nov 2006
Location: USA
Posts: 1,687
Good luck with that, 1.9.9 was never officially released and at that was only on Linux servers.

Your mileage may vary!
Greg_E is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump