Recieving and removing recieved information from cURL.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hauni
Forum Newbie
Posts: 11
Joined: Thu Sep 25, 2008 11:40 am

Recieving and removing recieved information from cURL.

Post 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.
User avatar
LuckyShot
Forum Newbie
Posts: 13
Joined: Thu Sep 25, 2008 5:02 pm
Location: Barcelona

Re: Recieving and removing recieved information from cURL.

Post 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".
Post Reply