curl limit

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
vpapousek
Forum Newbie
Posts: 2
Joined: Fri Mar 02, 2007 5:26 am

curl limit

Post 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]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
vpapousek
Forum Newbie
Posts: 2
Joined: Fri Mar 02, 2007 5:26 am

Post by vpapousek »

If i output the $content, there is not all. Yes of course i have permission to do that.
Post Reply