Help met php

Gestart doorMaartenl3 reacties24 weergaven

4 berichten · pagina 1 van 1

Maartenl

Lid · Topicstarter

Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik zit nu met een probleem, ik heb nu dit :

[COLOR= #0000BB]<?
        $ch[/COLOR] [COLOR= #007700]=[/COLOR] curl_init[COLOR= #007700]();[/COLOR]
    curl_setopt[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_URL[COLOR= #007700],[/COLOR] [COLOR= #DD0000]http://www.nieuwsblad.be/sportwereld/voetbal/ploeg.aspx?competitie=VB1112-4686&ploeg=VB1112-4686-VB1112-77617[/COLOR][COLOR= #007700]);[/COLOR]
    
    [COLOR= #0000BB]$content[/COLOR] [COLOR= #007700]=[/COLOR] curl_exec[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]#<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="comp_txt">(.*)</table>#[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$content[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$klassement[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$klassement[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
?>


Maar nu wordt de volledige pagina weergegeven.
Hoe kan ik dit oplossen ?
0
Berichten
450
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?
        $ch[/COLOR] [COLOR= #007700]=[/COLOR] curl_init[COLOR= #007700]();[/COLOR]
    curl_setopt[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_URL[COLOR= #007700],[/COLOR] [COLOR= #DD0000]http://www.nieuwsblad.be/sportwereld/voetbal/ploeg.aspx?competitie=VB1112-4686&ploeg=VB1112-4686-VB1112-77617[/COLOR][COLOR= #007700]);[/COLOR]
    
    [COLOR= #0000BB]$content[/COLOR] [COLOR= #007700]=[/COLOR] curl_exec[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]#<table width="50%" length="50%"  border="0" cellspacing="0" cellpadding="0" class="comp_txt">(.*)</table>#[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$content[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$klassement[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$klassement[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
?>


EDIT:

* width="50%" *
50% = breedte als je hem breeder wilt zet je 60% wink

* length="50%" *
50% = lengte als je hem langer wilt zet je 60% wink
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Tmeiland schreef:
[COLOR= #0000BB]<?
        $ch[/COLOR] [COLOR= #007700]=[/COLOR] curl_init[COLOR= #007700]();[/COLOR]
    curl_setopt[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_URL[COLOR= #007700],[/COLOR] [COLOR= #DD0000]http://www.nieuwsblad.be/sportwereld/voetbal/ploeg.aspx?competitie=VB1112-4686&ploeg=VB1112-4686-VB1112-77617[/COLOR][COLOR= #007700]);[/COLOR]
    
    [COLOR= #0000BB]$content[/COLOR] [COLOR= #007700]=[/COLOR] curl_exec[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]#<table width="50%" length="50%"  border="0" cellspacing="0" cellpadding="0" class="comp_txt">[/COLOR] [COLOR= #007700]. (.*) .[/COLOR] [COLOR= #DD0000]</table>#[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$content[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$klassement[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$klassement[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
?>
EDIT:

* width="50%" *
50% = breedte als je hem breeder wilt zet je 60% wink

* length="50%" *
50% = lengte als je hem langer wilt zet je 60% wink

Weet jij überhaupt wel wat preg_match(); doet?

table width 50% staat nergens in het opgevraagde document.

Ontopic:

Doe het anders met file_get_contents(); en explode(); ?
0
Maartenl

Lid · Topicstarter

Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
OPGELOST

SLOTJE
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