Page 1 of 1

Recieving and removing recieved information from cURL.

Posted: Thu Sep 25, 2008 11:45 am
by hauni
Alright, I'm not very good with PHP.
A newbie is a very suitable word.
Alright, what I want to is to make this code get the names that shows up, and nothing more.
It's important that it's only the names that shows up!
You run the PHP code and you'll know what I mean by names.

All help really appreciated!
Thanks!

Code: Select all

<?php
 
     $ch = curl_init("http://www.tibia.com/community/?subtopic=guilds&page=view&GuildName=Society+of+the+Black+Rose");
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $output = curl_exec($ch);       
        curl_close($ch); 
 
 
$expl = explode("<TD WIDTH=30%><B>Joining Date</B></TD></TR>", $output);
$expl = explode("</TABLE>", $expl[1]);
 
 
echo $expl[0]; 
        $ch = curl_init("http://www.tibia.com/community/?subtopic=guilds&page=view&GuildName=Society+of+the+Black+Rose");
 
?>
 
Regards,
Hauni.

Re: Recieving and removing recieved information from cURL.

Posted: Thu Sep 25, 2008 5:53 pm
by LuckyShot
You should have a look at RegEx.
There are some simple and useful examples out there.
Try searching "regex tutorial" or "regex examples".