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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.