Could you give me any script if you have
Or
Please some pointers where can get the code
Regards
malli
Main Topics
Browse All TopicsHi
Experts
I am looking for a script to extract data from url links . I have 100 urls from where i need to extract the content and send it to a my mail id
this conetent will be changing everyday. I should not take the old content the script should take the newly added content only.
Planning to run a cron job to send the content automatically. please help me how do i write this php code
Mallik
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
<?php
$curl = curl_init ();
curl_setopt($curl, CURLOPT_URL ,"http://newyork.craigslis
curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ( $curl);
curl_close ($curl );
print $result;
?>
Hi this is the basic code we are talking about. I have 100 urls i need to process. Every url contains few html links and i need to collect all the html links in all pages and send it to my email id.
and i want to run this script everyday. If there is a link already extracted then it should take that link... I think this is the challenging part.
Please help me .. i badly need this...
Regards
malli
$line_array = @file('c:/c.txt');
foreach ($line_array as $line)
{
$curl = curl_init($line);
curl_setopt($curl, CURLOPT_URL ,1);
curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);
$lst = curl_exec($curl);
print $lst;
curl_close ($curl );
}
Hey... I tried this code...it is not working... what is wrong in it.... it is failing at this statement $lst = curl_exec($curl);
Please help
IS the c.txt file the one with the URLs?
You could also try this:
$line_array = @file('c:/c.txt');
foreach ($line_array as $line)
{
// I assume $line has a value similar to http://google.com
$lst = file_get_contents($line);
print $lst;
}
Business Accounts
Answer for Membership
by: wildzeroPosted on 2006-09-21 at 15:29:42ID: 17573724
Stick all the urls into an array.
Loop the array and use curl to goto the website and fetch the content.
Then use regular expressions to strip the content you want
Send an email to with the data extracted
Rinse and repeat :-)
Thats about as much info as I can provide considering the info you provided.