Jump to content

PHP cURL error


RIRedinPA

Recommended Posts

I'm working on doing some iPhone apps and repurposing web sites for viewing on an iPhone. I wrote a simple AppleScript that uses curl to search the archives of a site and return articles related to the search. It worked fine.

 

I then tried to do the same in PHP but I keep getting this error message:

 

Your request was redirected�?1

 

I'm not too experienced with curl so I'm not sure what that message means.

 

Here's the code I'm using:

 


$url = "http://xxxx.xxxx.com/Editorial/Search/SearchResult.aspx?KW=Woonsocket";
	$curl_handle=curl_init();
	curl_setopt($curl_handle,CURLOPT_URL,'http://example.com');
	$result = curl_exec($curl_handle);
	curl_close($curl_handle);
		print $result; 

 

Any help would be appreciated...

 

Never mind, I found my error, I never took out the example.com from the sample code I downloaded....doh!

Link to comment
https://forums.phpfreaks.com/topic/184543-php-curl-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.