PHP preg match

Gestart doorJoeryy6 reacties37 weergaven

7 berichten · pagina 1 van 1

Joeryy

Lid · Topicstarter

Berichten
1.533
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hey,

Ik leg uit in deze afbeelding wat ik bedoel:

(De site: http://mpgh.net/forum/175-crossfire-hacks-cheats/)
Afbeelding

Ik heb dit maar dat gaat wss nooit werken emo.

[COLOR= #0000BB]<?php

$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"http://mpgh.net/forum/175-crossfire-hacks-cheats/"[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$check_hash[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]#<div class="inner"> <h3 class="threadtitle"> <a href=".*?" id=".*?"><img class=".*?" src=".*?" alt="Go to first new post" title="Go to first new post"></a> <img src=".*?" alt=".*?" border="0" title=".*?"> <span class="prefix understate"> <span style=".*?"><b>(.*?)</b></span> </span> <a class="title threadtitle_unread" href="(.*?)" id=".*?">(.*?)</a> </h3> <div class="threadmeta"> <div class="author"> <span class="label">Started by&nbsp;<a rel="nofollow" href="(.*?)" class="username understate" title="Started by (.*?) on .*?">.*?</a>.*?</span> </div> </div> </div>#[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$match[/COLOR][COLOR= #007700]);[/COLOR]

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


Poedeltje.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Is zie dat het een forum is, is RSS geen betere optie?
De meeste forums hebben die wel.
0
Joeryy

Lid · Topicstarter

Berichten
1.533
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
Is zie dat het een forum is, is RSS geen betere optie?
De meeste forums hebben die wel.
Ja inderdaad, RSS is de oplossing. biggrin
http://www.mpgh.net/forum/external.php?type=RSS2&forumids=175

Ik heb nu deze code, het werk prima. Alleen $dc werkt niet, ik krijg dan deze error:
Notice: Trying to get property of non-object in C:xampphtdocscrossfireindex.php on line 9

[COLOR= #0000BB]<?php  
$rss[/COLOR] [COLOR= #007700]=[/COLOR] simplexml_load_file[COLOR= #007700]([/COLOR][COLOR= #DD0000]http://www.mpgh.net/forum/external.php?type=RSS2&forumids=175[/COLOR][COLOR= #007700]);[/COLOR] 

[URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]<[/COLOR][COLOR= #0000BB]10[/COLOR][COLOR= #007700];[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]+=[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
    [COLOR= #0000BB]$namespaces[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$rss[/COLOR][COLOR= #007700]->[/COLOR]getNameSpaces[COLOR= #007700]([/COLOR]true[COLOR= #007700]);[/COLOR]
    [COLOR= #0000BB]$dc[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$rss[/COLOR][COLOR= #007700]->[/COLOR]children[COLOR= #007700]([/COLOR][COLOR= #0000BB]$namespaces[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]dc[/COLOR][COLOR= #007700]]);[/COLOR]
    
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Title: "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$rss[/COLOR][COLOR= #007700]->[/COLOR]channel[COLOR= #007700]->[/COLOR]item[COLOR= #007700][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]->[/COLOR]title [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"<br>"[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Creator: "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$dc[/COLOR][COLOR= #007700]->[/COLOR]channel[COLOR= #007700]->[/COLOR]item[COLOR= #007700][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]->[/COLOR]creator [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"<br>"[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Link: "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$rss[/COLOR][COLOR= #007700]->[/COLOR]channel[COLOR= #007700]->[/COLOR]item[COLOR= #007700][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]->[/COLOR][URL="http://www.php.net/link"]link[/URL] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"<br><br>"[/COLOR][COLOR= #007700];
}[/COLOR]  
?>


toevoeging op 14 augustus 2013, 11:04:30:
En dan nog een vraag, de laatste biggrin
Deze code werkt alleen op het forum ID 175, doe ik het bijv. op 168 dan haalt hij het wel op maar met error:
175:
Spoiler tonen
Title: [Release] Mamo`s Hack V6.1 [Memory Hack || ReBuild]
Link: http://www.mpgh.net/forum/175-crossfire-hacks-cheats/721565-mamo-s-hack-v6-1-memory-hack-rebuild.html

Hoi

Hoi

Title: [Release] V23
Link: http://www.mpgh.net/forum/175-crossfire-hacks-cheats/719659-v23.html

Hoi

Hoi

Hoi

Hoi

Hoi

Hoi
168:
Spoiler tonen
Title: [Release] Free IDs (non gs play)
Link: http://www.mpgh.net/forum/168-blackshot-hacks-cheats/720361-free-ids-non-gs-play.html

Title: [Release] [MPGH] Injector by felipe4334
Link: http://www.mpgh.net/forum/168-blackshot-hacks-cheats/713601-multiplayer-game-hacking-injector-felipe4334.html

Title: [Release] Airport Glitch
Link: http://www.mpgh.net/forum/168-blackshot-hacks-cheats/711793-airport-glitch.html

Title: [Release] iTech InjectorÀ‚™ 1.0 (Super Simple Easy To Use Injector By iTechÀ‚™)
Link: http://www.mpgh.net/forum/168-blackshot-hacks-cheats/710105-itech-injector-1-0-super-simple-easy-use-injector-itech.html

Title: [Release] Special Ops Injector - Responses - /w Voice
Link: http://www.mpgh.net/forum/168-blackshot-hacks-cheats/706939-special-ops-injector-responses-w-voice.html

Hoi

Title: [Release] N-Ject v1.0.0
Link: http://www.mpgh.net/forum/168-blackshot-hacks-cheats/704963-n-ject-v1-0-0-a.html
Notice: Trying to get property of non-object in C:xampphtdocscrossfireindex.php on line 7
Hoi

Notice: Trying to get property of non-object in C:xampphtdocscrossfireindex.php on line 7
Hoi

Notice: Trying to get property of non-object in C:xampphtdocscrossfireindex.php on line 7
Hoi

[COLOR= #0000BB]<?php
$rss[/COLOR] [COLOR= #007700]= New[/COLOR] DOMDocument[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$rss[/COLOR] [COLOR= #007700]=[/COLOR] simplexml_load_file[COLOR= #007700]([/COLOR][COLOR= #DD0000]http://www.mpgh.net/forum/external.php?type=RSS2&forumids=168[/COLOR][COLOR= #007700]);[/COLOR] 

[URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]<[/COLOR][COLOR= #0000BB]10[/COLOR][COLOR= #007700];[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]+=[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/substr"]substr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$rss[/COLOR][COLOR= #007700]->[/COLOR]channel[COLOR= #007700]->[/COLOR]item[COLOR= #007700][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]->[/COLOR]title[COLOR= #007700],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]9[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #DD0000][Release][/COLOR][COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Title: "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$rss[/COLOR][COLOR= #007700]->[/COLOR]channel[COLOR= #007700]->[/COLOR]item[COLOR= #007700][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]->[/COLOR]title [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"<br>"[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Link: "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$rss[/COLOR][COLOR= #007700]->[/COLOR]channel[COLOR= #007700]->[/COLOR]item[COLOR= #007700][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]->[/COLOR][URL="http://www.php.net/link"]link[/URL] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"<br><br>"[/COLOR][COLOR= #007700];
    }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Hoi<br><br>[/COLOR][COLOR= #007700];
    }
}[/COLOR]
0
Joeryy

Lid · Topicstarter

Berichten
1.533
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bump, heb het echt nodig want ik kan nu niet verder confused
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Doe eens een algehele print_r() op $rss->channel? Misschien dat er net iets mist ofzo?
0
Joeryy

Lid · Topicstarter

Berichten
1.533
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
Doe eens een algehele print_r() op $rss->channel? Misschien dat er net iets mist ofzo?
Iemand op Stackoverflow had me geholpen, ik post morgen de code.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Toppie...
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