Jump to content

php curl question


RIRedinPA

Recommended Posts

I'm using curl to get archived material from a web site. The way the site works is it does a search of their database through the query string (oy!) so if you send something like this http://www.notoosecureasite.com/Search/SearchResult.aspx?KW=hacking I'll get the code output for a web page showing all articles that matched that search - they are displayed with a headline, link and blurb but there is also a lot of other stuff displayed on the page. I just want to parse through this page and get the relevant stuff...

 

The problem is right now my page is displaying their page. How do I curl this site and just get the result into a variable without displaying it? Right now it is acting as if I am using an include file.

 

Here's the code I am using:

 


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

Link to comment
https://forums.phpfreaks.com/topic/184545-php-curl-question/
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.