Page 1 of 1

curl limit

Posted: Fri Mar 02, 2007 5:33 am
by vpapousek
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi,
i have problem with curl in my code.

Code: Select all

## BEGIN CURLING

  $ch = curl_init();
  curl_setopt ( $ch, CURLOPT_URL, $url );
  curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
  $content = curl_exec ( $ch ) ;
  curl_close ( $ch );
  
  $pole = explode("\n", $content);
When i use the variable $pole it contains only 3800 lines of text. But the file has over 8000 lines. I guess there is some limit. I can't use fopen or copy on my hosting. Unfortunately i need only few lines from the file but all of them. Is there any chance to handle that?

Thanx


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Fri Mar 02, 2007 8:08 am
by feyd
If you output $content, is it not all there? Typically, extracting information would be done with a regular expression.

Also, I hope you have the site owner's permission to scrape information from their pages.

Posted: Fri Mar 02, 2007 8:45 am
by vpapousek
If i output the $content, there is not all. Yes of course i have permission to do that.