Now.in

Gestart doorDylan7 reacties34 weergaven

8 berichten · pagina 1 van 1

Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Als je now.in gebruikt en je luistert naar een radio kan je ook zien hoeveel luisteraars erzijn, hoe kan je die op je site krijgen?
0
Berichten
5.957
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je zou get content kunnen doen en dan preg_replace of een van de andere functies om te weten hoeveel er zijn.

Die code in je onderschrift klopt ook langs geen klote sm_eerie.
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Alemaalte schreef:
Je zou get content kunnen doen en dan preg_replace of een van de andere functies om te weten hoeveel er zijn.
Code?
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
codedump.com/sdis29SDi92

toevoeging op 23 februari 2012, 19:54:36:
Dus als je ff had gegoogled:

$url = http://www.website.nl;
$string = file_get_contents($url);
if (preg_match(/<div id="div1">([^<]*)</div>/, $string, $matches) > 0) {
    echo $matches[1]; //This is text one
}
0
Berichten
238
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dit kan je zo terugvinden in Google?
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Milan schreef:
toevoeging op 23 februari 2012, 19:54:36:
Dus als je ff had gegoogled:

$url = http://www.website.nl;
$string = file_get_contents($url);
if (preg_match(/<div id="div1">([^<]*)</div>/, $string, $matches) > 0) {
    echo $matches[1]; //This is text one
}


Het is geen div maar een dd ofz?

<dd id="listener" title="Number of online listeners">
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kan je precies hetzelfde doen
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$url[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]http://now.in/radio/lol[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$string[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]/<dd id="listener" title="Number of online listeners">([^<]*)</dd>/[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$string[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$matches[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$matches[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR] [COLOR= #FF8000]//This is text one[/COLOR]
[COLOR= #007700]}[/COLOR]
?>


werkt niet
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren