Hello, I'm looking for:
I two sites. I want to make on one of them index.php where will be line of getting info from second site. Just few words.
If there is anybody who knows how to do such thing, please tell me.
Thanx.
Printable View
Hello, I'm looking for:
I two sites. I want to make on one of them index.php where will be line of getting info from second site. Just few words.
If there is anybody who knows how to do such thing, please tell me.
Thanx.
give more details what do you want to do
I have page that works on port 8000 (winamp server page) and i have regular web server that works on 80 port. I can not get source code from shout cast to change web page on port 8000, so i want just to get some lines from there and add them + design on port 80 server.
thanx.
You could do a php include to include the whole page, thats all I could think of sorry.
take needed data with
and then further actions depends on what you want to extractPHP Code:$shoutcast_page = file("http://somewhere:8000/");
[lexx]
can you explain how to include exact line (currnet song) from that page by using
$shoutcast_page = file("http://somewhere:8000/"); ?
thanx
$shoutcast_page is an array of lines in the source file. if song's location is always one and the same , you can get particular line by adding array index to variable
e.g. for third line of HTML source use
of course, there migt be some html tags needed to get rid of..PHP Code:echo $shoutcast_page[2];
<php?
$shoutcast_page = file("http://radio:8000/");
echo $shoutcast_page[2];
?>
I put the code like this, but it's not working :(
it works, you just can't see in bare eye.
first of all not
<php?
but
<?php
and then decide what line in file you need to get. bare in mind that contents of $shoutcast_page are pure HTML so expect some html tags are on first lines of you source file.
save your shoutcast page and attach here and post what exactly you want to extract
but there is a problem. I can't find the shoutcast page, I guess it's inside server.
and you don't need it raw.
just open it in a browser and then save it as ordinary html page
I'm totally confused. Sorry for my noobish questions.
I oppened source code of shoutcast page and my php page.
what I should write in $shoutcast_page ?
Thanx.
just post here your shoutcast page's HTML content. or attach saved file (in Internet Explorer File->Save as...). you need to inspect that file and find out what you want to take from it
o, no, I need text that changes (music name). But I want to arange it on my page what is located on app server.
jezus crist!Quote:
Originally Posted by Gashek
first you need inspect HTML code to find beginning and end of what you want to include. only then comes coding
Edit:
Thanx for trying to help me, but I found solutionby myself. Finally I got what [lexx] told me.
Thanx.
thanks god :)Quote:
Originally Posted by Gashek