Scummy12 Posted May 16, 2010 Share Posted May 16, 2010 Can someone please tell me why I am getting an error with this script? <?php $count = 0; $num = 25; while($count<$num) { $curl = curl init(); $site = "www.google.com"; curl_resptop($curl, curlopt_URL, $site); curl_setopt($curl, curlopt_returntransfer,1); $return = curl_exec($curl); curl_close($curl); echo $count . "-"; if ($return) echo "It Worked" $count++; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/201909-error/ Share on other sites More sharing options...
Psycho Posted May 16, 2010 Share Posted May 16, 2010 And what error are you getting? (although I think I see it already) Quote Link to comment https://forums.phpfreaks.com/topic/201909-error/#findComment-1058976 Share on other sites More sharing options...
public-image Posted May 16, 2010 Share Posted May 16, 2010 Oly thing I can think of is the if($return) being like so I would normaly do if($return){ and at end of: $count++; } } Dunno if that is it but might have something to do with it Quote Link to comment https://forums.phpfreaks.com/topic/201909-error/#findComment-1058989 Share on other sites More sharing options...
Psycho Posted May 16, 2010 Share Posted May 16, 2010 There is one error on this line echo "It Worked" But, the OP hasn't provided the error he/she is getting, so that might not be the one referenced in the post. Quote Link to comment https://forums.phpfreaks.com/topic/201909-error/#findComment-1059215 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.