SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: curl
-
Jul 27, 2009, 02:30 #1
curl
i want to grab some contents of a webpage,how shall i do it?someone told me use CURL,but i don't know how to use it.
is there anyone can give me some tips.
3Q.Outdoor tools online store and wargame tools shop
with best quality and service.
comp molle tactical vest tactical clothing etc sell
-
Jul 27, 2009, 02:39 #2
- Join Date
- Apr 2008
- Location
- North-East, UK.
- Posts
- 6,111
- Mentioned
- 3 Post(s)
- Tagged
- 0 Thread(s)
PHP Code:<?php
$rCurl = curl_init();
$aCurlOptions = array(
CURLOPT_URL => 'http://www.google.com/',
CURLOPT_RETURNTRANSFER => true
);
curl_setopt_array($rCurl, $aCurlOptions);
$sPageData = curl_exec($rCurl);
curl_close($rCurl);
?>
@AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.
-
Jul 27, 2009, 03:27 #3
it doesn't work!
the tip is:Parse error: parse error, expecting `')''
i look for the error lots time,but can not find.where is the error?Outdoor tools online store and wargame tools shop
with best quality and service.
comp molle tactical vest tactical clothing etc sell
-
Jul 27, 2009, 03:37 #4
- Join Date
- Jun 2008
- Posts
- 205
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
There is no error when i executed the script
-
Jul 27, 2009, 03:52 #5
- Join Date
- Apr 2008
- Location
- North-East, UK.
- Posts
- 6,111
- Mentioned
- 3 Post(s)
- Tagged
- 0 Thread(s)
Well, there isn't one.
Are you modifying the code, if so, can you paste your code here?@AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.
-
Jul 27, 2009, 04:57 #6
i didn't do a change,just copied and pasted. when i clicked the file,it appeared parse error.then i opened the file ,finding the file's code had been changed.
is this true,where is the grabbed content?Outdoor tools online store and wargame tools shop
with best quality and service.
comp molle tactical vest tactical clothing etc sell
Bookmarks