View unanswered posts | View active topics It is currently Tue Aug 22, 2017 4:09 pm



Reply to topic  [ 1 post ] 
 web crawler 
Author Message
Junior Member

Joined: Sun Jul 01, 2007 5:14 am
Posts: 3
Post web crawler
I am trying to write a PHP web crawler but am having problems. I want to start off by getting the title and other elements of a page. This is what i have so far:

Code:
$str = "a <title>bla bla this is the title</title> a";

echo "the title is: ".preg_replace("/^<title>(.*)<\/title>$/","it works",$str);
$title = split("/^<title>(.*)<\/title>$/",$str);
echo "\n<p>".print_r($title);


However this only shows one element of the array, which is the whole string.
Can someone please show me what i am doing wrong?:confused:


Sun Jul 01, 2007 5:26 am
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.