Jump to content

convert to curl


youneek

Recommended Posts

How could I convert this script to use cURL?

 

if (isset($_POST["url2"])){
$url = $_POST["url2"];
$data = implode("", file($url));
preg_match_all ("/<title>(.*?)<\/title>/i", $data, $allurl);
foreach ( $allurl[0] as $addr ){
$path = "http://web.archive.org/web/*/http://".trim($addr, "\r");
$data2 = implode("", file($path));
preg_match_all ("/<p class=\"mainSearchTitle\">([^`]*?)<\/p>/", $data2, $matches);
	foreach ($matches[0] as $match) {
	$match = strip_tags($match);
	echo trim(preg_replace("/ pages found for/", "", $match), "             ")."<br />";
	flush();
    	ob_flush();
	}
}

}else{

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