Bezoeken van links

Gestart doorBen7 reacties78 weergaven

8 berichten · pagina 1 van 1

Ben

Lid · Topicstarter

Berichten
4.598
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als dit (zie 2de code) in de source staat, hoe laat je hem dan http://link.com/dagklik.php?id=xxx bezoeken elk om de beurt in PHP?
Ik heb dit al;

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/error_reporting"]error_reporting[/URL][COLOR= #007700]([/COLOR]E_ALL[COLOR= #007700]);[/COLOR]
 [COLOR= #0000BB]$ch[/COLOR] [COLOR= #007700]=[/COLOR] curl_init[COLOR= #007700]();[/COLOR]
    [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]x[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]x[/COLOR][COLOR= #007700];[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_URL[COLOR= #007700],[/COLOR] [COLOR= #DD0000]http://x.nl/inloggen.php[/COLOR][COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_POST[COLOR= #007700],[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_POSTFIELDS[COLOR= #007700],[/COLOR] [COLOR= #DD0000]gebruikersnaam=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]&wachtwoord=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$pass[/COLOR][COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_HEADER[COLOR= #007700],[/COLOR] FALSE[COLOR= #007700]);[/COLOR] 
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_COOKIEJAR[COLOR= #007700],[/COLOR] [COLOR= #DD0000]cookie.txt[/COLOR][COLOR= #007700]);[/COLOR] 
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_RETURNTRANSFER[COLOR= #007700],[/COLOR] TRUE[COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_USERAGENT[COLOR= #007700],[/COLOR] [COLOR= #DD0000]Mozilla/4.0[/COLOR][COLOR= #007700]);[/COLOR]
    
    curl_exec [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]
    
    [COLOR= #FF8000]##Hier zou die code moeten komen##[/COLOR]

?>


Het gaat om zon code;

<tr class="link">
            <td>
                <a target="_blank" href="dagklik.php?id=45000">xxxx a</a>
            </td>
            <td>
                0,8 punt(en) / klik
            </td>
        </tr>
        <tr class="link">
            <td>
                <a target="_blank" href="dagklik.php?id=37582">xxxx</a>
            </td>
            <td>
                0,8 punt(en) / klik
            </td>
        </tr>
        <tr class="link">
            <td>
                <a target="_blank" href="dagklik.php?id=30917">xxxx</a>
            </td>
            <td>
                0,8 punt(en) / klik
            </td>
        </tr>
        <tr class="link">
            <td>
                <a target="_blank" href="dagklik.php?id=32995">xxxx</a>
            </td>
            <td>
                0,8 punt(en) / klik
            </td>
        </tr>
        <tr class="link">
            <td>
                <a target="_blank" href="dagklik.php?id=29207">xxxx</a>
            </td>
            <td>
                0,8 punt(en) / klik
            </td>
        </tr>
        <tr class="link">
            <td>
                <a target="_blank" href="dagklik.php?id=48835">xxxxx</a>
            </td>
            <td>
                0,8 punt(en) / klik
            </td>
        </tr>
        <tr class="link">
            <td>
                <a target="_blank" href="dagklik.php?id=46940">xxxx</a>
            </td>
            <td>
                0,8 punt(en) / klik
            </td>
        </tr>


Alvast bedankt voor de hulp smile
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik denk iets met een foreach van een preg_match, en dan met preg_match het id opvragen?
0
Ben

Lid · Topicstarter

Berichten
4.598
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Gamedealer schreef:
Ik denk iets met een foreach van een preg_match, en dan met preg_match het id opvragen?
Ik ken niks van PHP maar ik denk wel dat ik preg_match moet gaan gebruiken inderdaad yummie
0
Berichten
2.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php

$startcode[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]die html die je hebt[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$explode[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000].php?id=[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$startcode[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$ids[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]();[/COLOR]

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$explode[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$id[/COLOR][COLOR= #007700])
{[/COLOR]
    
    [COLOR= #0000BB]$temp[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$id[/COLOR][COLOR= #007700]);[/COLOR]
    
    [COLOR= #0000BB]$ids[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #0000BB]$temp[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]];
    
    
}[/COLOR]


?>


Zoiets. Weet niet of hij werkt, heb het even uit de losse pols geschreven. Al je ids staan in de var $ids;
0
Ben

Lid · Topicstarter

Berichten
4.598
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kan er bij startcode ook een URL ingevoerd worden? yummie
0
Berichten
2.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Anders leer je ff php voordat je dit soort codes gaat schrijven.. emo
0
Ben

Lid · Topicstarter

Berichten
4.598
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ruben schreef:
Anders leer je ff php voordat je dit soort codes gaat schrijven.. emo
Daarom vraag ik eigenlijk ook hulp, maar daar ga ik binnekort mee beginnen inderdaad smile
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Ben schreef:
Kan er bij startcode ook een URL ingevoerd worden? yummie
Nee, er wordt een string verwacht, dus je kan bijv. curl_exec ($ch); gebruiken.
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