NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page [resolved] fopen to curl help

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 01-06-2008, 02:11 PM THREAD STARTER               #1 (permalink)
Senior Member
 
DJ-Sound's Avatar
Join Date: May 2004
Posts: 1,814
DJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud of
 



Help! fopen to curl help


I've been searching on google, I can't really find a good resource to convert fopen to CURL.

Any one know of a easier to understand resource? Below is the file, any help is much appreciated!

-Ryan

Code:
<?php
if (!defined('SMF'))
	die('Hacking attempt...');

// Globals
$feedcount = 0;
$maxitemcount = 0;
$tag = '';
$insideitem = false;

function verify_rss_url($url)
{
	global $txt;

	// Rss Data storage
	$finalrss = '';
	$failed = true;

	$fp2 = fopen($url, "r");
	if ($fp2)
	{
		$failed = false;
		$contents = '';
		while (!feof($fp2))
		{
		  $contents .= fread($fp2, 8192);
		}

		fclose($fp2);

		$finalrss = $contents;
	}


	// Use Fsockopen
	if($failed == true)
	{
		$url_array = parse_url($url);

		$fp = fsockopen($url_array['host'], 80, $errno, $errstr, 30);
		if (!$fp)
		{

		}
		else
		{
			$failed = false;

		   $out = "GET " . $url_array['path'] . @$url_array['query'] . "  HTTP/1.1\r\n";
		   $out .= "Host: " . $url_array['host'] . "\r\n";
		   $out .= "Connection: Close\r\n\r\n";

		   fwrite($fp, $out);

		   $rssdata = '';

		   while (!feof($fp))
		   {
		       $rssdata .= fgets($fp, 128);
		   }
		   fclose($fp);

		   // Get rid of the stupid header information! Wish the function did it for me.
		   $rss2 = explode("\\r\\", $rssdata);
		   @$finalrss = @$rss2[1];

		}
	}

	// Use cURL
	if($failed == true)
	{
		if(function_exists("curl_init"))
		{
			$failed = false;
			// Last but not least try cUrl
			$ch = curl_init();

			// set URL and other appropriate options
			curl_setopt($ch, CURLOPT_URL, $url);
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

			// grab URL, and return output
			$output = curl_exec($ch);

			// close curl resource, and free up system resources
			curl_close($ch);
			return $output;
		}
	}



	// XML Parser functions to verify the XML Feed
	if($failed == false)
	{
		$depth = array();

		$xml_parser = xml_parser_create();
		xml_set_element_handler($xml_parser, "startElement2", "endElement2");


		   if (!xml_parse($xml_parser, $finalrss)) {
		      fatal_error(sprintf($txt['feedposter_err_xmlerror'],
		                   xml_error_string(xml_get_error_code($xml_parser)),
		                   xml_get_current_line_number($xml_parser)), false);
		   }

		xml_parser_free($xml_parser);
	}
	else
	{
		// We were not able to download the feed :(
		fatal_error($txt['feedposter_err_nodownload'], false);
	}


}


function startElement2($parser, $name, $attrs)
{
   global $depth;
   $depth[$parser]++;
}

function endElement2($parser, $name)
{
   global $depth;
   $depth[$parser]--;
}

function UpdateRSSFeedBots()
{
	global $db_prefix, $context, $sourcedir, $feedcount, $func, $maxitemcount, $insideitem, $tag, $modSettings;

	// First get all the enabled bots
	$context['feeds'] = array();
	$request = db_query("
			SELECT
				ID_FEED, ID_BOARD, feedurl, title, postername, updatetime, enabled, html,
				ID_MEMBER, locked, articlelink, topicprefix, numbertoimport, importevery
			FROM {$db_prefix}feedbot
			WHERE enabled = 1", __FILE__, __LINE__);

	while ($row = mysql_fetch_assoc($request))
	{
		$context['feeds'][] = array(
			'ID_FEED' => $row['ID_FEED'],
			'ID_BOARD' => $row['ID_BOARD'],
			'feedurl' => $row['feedurl'],
			'title' => $row['title'],
			'postername' => $row['postername'],
			'enabled' => $row['enabled'],
			'html' => $row['html'],
			'ID_MEMBER' => $row['ID_MEMBER'],
			'locked' => $row['locked'],
			'articlelink' => $row['articlelink'],
			'topicprefix' => $row['topicprefix'],
			'numbertoimport' => $row['numbertoimport'],
			'importevery' => $row['importevery'],
			'updatetime' => $row['updatetime']
		);
	}

	mysql_free_result($request);

	// For the createPost function
	require_once($sourcedir . '/Subs-Post.php');

	// Check if a field expired
	foreach ($context['feeds'] as $key => $feed)
	{

		$current_time = time();


		// If the feedbot time to next import has expired
		if (($current_time + mktime(0, $feed['importevery'])) > $feed['updatetime'])
		//if( 1 == 1)
		{

			$feeddata = GetRSSData($feed['feedurl']);



			if ($feeddata != false)
			{

				// Process the XML
					$xml_parser = xml_parser_create();
					$context['feeditems'] = array();
					$feedcount = 0;
					$maxitemcount = $feed['numbertoimport'];
					$tag = '';
					$insideitem = false;
					$context['feeditems'][0] = array();
					$context['feeditems'][0][] = array();
					$context['feeditems'][0]['title'] = '';
					$context['feeditems'][0]['description'] = '';
					$context['feeditems'][0]['link'] = '';



					xml_set_element_handler($xml_parser, "startElement1", "endElement1");
					xml_set_character_data_handler($xml_parser, "characterData1");

					if (!xml_parse($xml_parser, $feeddata))
					 {
						// Error reading xml data

					     xml_parser_free($xml_parser);
					 }
					else
					{
					   	// Data must be valid lets extra some information from it
					   	// RSS Feeds are a list of items that might contain title, description, and link


					   	// Free the xml parser memory
						xml_parser_free($xml_parser);

						// Loop though all the items

						for ($i = 0; $i < ($maxitemcount); $i++)
						{
							// Check feed Log
							// Generate the hash for the log
							if(!isset($context['feeditems'][$i]['title']) || !isset($context['feeditems'][$i]['description']) || !isset($context['feeditems'][$i]['link']))
								continue;


							$itemhash = md5($context['feeditems'][$i]['title'] . $context['feeditems'][$i]['description']);
							$request = db_query("
							SELECT
								feedtime
							FROM {$db_prefix}feedbot_log
							WHERE feedhash = '$itemhash'", __FILE__, __LINE__);

							mysql_freeresult($request);

							// If no has has found that means no duplicate entry
							if (db_affected_rows() == 0)
							{

								// Create the Post
								$msg_title = $func['htmlspecialchars'](($feed['html'] ? $context['feeditems'][$i]['title'] : strip_tags($context['feeditems'][$i]['title'])), ENT_QUOTES);

								$msg_body =  $func['htmlspecialchars'](($feed['html'] ? $context['feeditems'][$i]['description'] . "\n\n" . $context['feeditems'][$i]['link']  : strip_tags($context['feeditems'][$i]['description'] .  "\n\n" . $context['feeditems'][$i]['link'])), ENT_QUOTES);



								$msgOptions = array(
									'id' => 0,
									'subject' => $feed['topicprefix'] . $msg_title,
									'body' => '' . $msg_title . "\n\n" . $msg_body,
									'icon' => 'xx',
									'smileys_enabled' => 1,
									'attachments' => array(),
								);
								$topicOptions = array(
									'id' => 0,
									'board' => $feed['ID_BOARD'],
									'poll' => null,
									'lock_mode' => $feed['locked'],
									'sticky_mode' => null,
									'mark_as_read' => true,
								);
								$posterOptions = array(
									'id' => $feed['ID_MEMBER'],
									'name' => $feed['postername'],
									'email' => '',
									'update_post_count' => (($feed['ID_MEMBER'] == 0) ? 0 : 1),
								);

								createPost($msgOptions, $topicOptions, $posterOptions);

								// Add Feed Log
								$fid = $feed['ID_FEED'];
								$ftime = time();

								db_query("
								INSERT INTO {$db_prefix}feedbot_log
									(ID_FEED, feedhash, feedtime)
								VALUES
									($fid,'$itemhash',$ftime)", __FILE__, __LINE__);

							}
						}

					 } // End valid XML check



			}  // End get feed data

		} // End expire check


	} // End for each feed

}

function GetRSSData($url)
{
	$url_array = parse_url($url);

	$fp2 = fopen($url, "r");
	if ($fp2)
	{
		$contents = '';
		while (!feof($fp2))
		{
		  $contents .= fread($fp2, 8192);
		}

		fclose($fp2);

		return $contents;
	}


	$fp = fsockopen($url_array['host'], 80, $errno, $errstr, 30);
	if (!$fp)
	{

	}
	else
	{


	   $out = "GET " . $url_array['path'] . @$url_array['query'] . "  HTTP/1.1\r\n";
	   $out .= "Host: " . $url_array['host'] . "\r\n";
	   $out .= "Connection: Close\r\n\r\n";

	   fwrite($fp, $out);

	   $rssdata = '';

	   while (!feof($fp))
	   {
	       $rssdata .= fgets($fp, 128);
	   }
	   fclose($fp);

	   // Get rid of the stupid header information! Wish the function did it for me.
	   $rss2 = explode("\\r\\", $rssdata);
	   $finalrss = $rss2[1];

	   return  $finalrss;
	}

	if(function_exists("curl_init"))
	{
		// Last but not least try cUrl
		$ch = curl_init();

		// set URL and other appropriate options
		curl_setopt($ch, CURLOPT_URL, $url);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

		// grab URL, and return output
		$output = curl_exec($ch);

		// close curl resource, and free up system resources
		curl_close($ch);
		return $output;
	}


	// Failure return false
	return false;

}

function startElement1($parser, $name, $attrs)
 {
	global $insideitem, $tag;
	if ($insideitem)
	{
		$tag = $name;
	}
	elseif ($name == "ITEM")
	{
		$insideitem = true;
	}
}

function endElement1($parser, $name)
{
	global $insideitem, $tag, $feedcount, $context;

	if ($name == "ITEM")
	{
		$feedcount++;
		$context['feeditems'][$feedcount] = array();
		$context['feeditems'][$feedcount][] = array();
		$context['feeditems'][$feedcount]['title'] = '';
		$context['feeditems'][$feedcount]['description'] = '';
		$context['feeditems'][$feedcount]['link'] = '';
		$insideitem = false;
	}
}

function characterData1($parser, $data)
 {
	global $insideitem, $tag,  $feedcount, $context, $maxitemcount;

	if ($insideitem && $feedcount < $maxitemcount)
 	{
		switch ($tag)
		{
			case "TITLE":
				$context['feeditems'][$feedcount]['title'] .= $data;
			break;

			case "DESCRIPTION":
				$context['feeditems'][$feedcount]['description'] .= $data;

			break;

			case "LINK":
				$context['feeditems'][$feedcount]['link'] .= $data;
			break;
		}
	}
}
?>
Last edited by DJ-Sound; 01-06-2008 at 03:38 PM.
DJ-Sound is offline  
Old 01-06-2008, 11:16 PM   #2 (permalink)
NamePros Member
Join Date: Jul 2006
Posts: 94
sote is a jewel in the roughsote is a jewel in the roughsote is a jewel in the rough
 



Your script tries fopen() first. If that fails, it tries fsockopen(). Finally if both fail, it will try curl.

Now since you want to convert fopen() to curl, I'm assuming you have fopen() disabled on your server and it gives an error when executed.
You don't really have to "convert" cause the curl code is already in there. Just remove the fopen() and fsockopen()

Here's the code with fopen() and fsockopen() removed. Hope it works.
Code:
<?php
if (!defined('SMF'))
	die('Hacking attempt...');

// Globals
$feedcount = 0;
$maxitemcount = 0;
$tag = '';
$insideitem = false;

function verify_rss_url($url)
{
	global $txt;

	// Rss Data storage
	$finalrss = '';
	$failed = true;


	// Use cURL
	if($failed == true)
	{
		if(function_exists("curl_init"))
		{
			$failed = false;
			// Last but not least try cUrl
			$ch = curl_init();

			// set URL and other appropriate options
			curl_setopt($ch, CURLOPT_URL, $url);
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

			// grab URL, and return output
			$output = curl_exec($ch);

			// close curl resource, and free up system resources
			curl_close($ch);
			return $output;
		}
	}



	// XML Parser functions to verify the XML Feed
	if($failed == false)
	{
		$depth = array();

		$xml_parser = xml_parser_create();
		xml_set_element_handler($xml_parser, "startElement2", "endElement2");


		   if (!xml_parse($xml_parser, $finalrss)) {
		      fatal_error(sprintf($txt['feedposter_err_xmlerror'],
		                   xml_error_string(xml_get_error_code($xml_parser)),  
		                   xml_get_current_line_number($xml_parser)), false);
		   }

		xml_parser_free($xml_parser);
	}
	else
	{
		// We were not able to download the feed :(
		fatal_error($txt['feedposter_err_nodownload'], false);
	}


}


function startElement2($parser, $name, $attrs)
{
   global $depth;
   $depth[$parser]++;
}

function endElement2($parser, $name)
{
   global $depth;
   $depth[$parser]--;
}

function UpdateRSSFeedBots()
{
	global $db_prefix, $context, $sourcedir, $feedcount, $func, $maxitemcount, $insideitem, $tag, $modSettings;

	// First get all the enabled bots
	$context['feeds'] = array();
	$request = db_query("
			SELECT
				ID_FEED, ID_BOARD, feedurl, title, postername, updatetime, enabled, html,
				ID_MEMBER, locked, articlelink, topicprefix, numbertoimport, importevery
			FROM {$db_prefix}feedbot
			WHERE enabled = 1", __FILE__, __LINE__);

	while ($row = mysql_fetch_assoc($request))
	{
		$context['feeds'][] = array(
			'ID_FEED' => $row['ID_FEED'],
			'ID_BOARD' => $row['ID_BOARD'],
			'feedurl' => $row['feedurl'],
			'title' => $row['title'],
			'postername' => $row['postername'],
			'enabled' => $row['enabled'],
			'html' => $row['html'],
			'ID_MEMBER' => $row['ID_MEMBER'],
			'locked' => $row['locked'],
			'articlelink' => $row['articlelink'],
			'topicprefix' => $row['topicprefix'],
			'numbertoimport' => $row['numbertoimport'],
			'importevery' => $row['importevery'],
			'updatetime' => $row['updatetime']
		);
	}

	mysql_free_result($request);

	// For the createPost function
	require_once($sourcedir . '/Subs-Post.php');

	// Check if a field expired
	foreach ($context['feeds'] as $key => $feed)
	{

		$current_time = time();


		// If the feedbot time to next import has expired
		if (($current_time + mktime(0, $feed['importevery'])) > $feed['updatetime'])
		//if( 1 == 1)
		{

			$feeddata = GetRSSData($feed['feedurl']);



			if ($feeddata != false)
			{

				// Process the XML
					$xml_parser = xml_parser_create();
					$context['feeditems'] = array();
					$feedcount = 0;
					$maxitemcount = $feed['numbertoimport'];
					$tag = '';
					$insideitem = false;
					$context['feeditems'][0] = array();
					$context['feeditems'][0][] = array();
					$context['feeditems'][0]['title'] = '';
					$context['feeditems'][0]['description'] = '';
					$context['feeditems'][0]['link'] = '';



					xml_set_element_handler($xml_parser, "startElement1", "endElement1");
					xml_set_character_data_handler($xml_parser, "characterData1");

					if (!xml_parse($xml_parser, $feeddata))
					 {
						// Error reading xml data

					     xml_parser_free($xml_parser);
					 }
					else
					{
					   	// Data must be valid lets extra some information from it
					   	// RSS Feeds are a list of items that might contain title, description, and link


					   	// Free the xml parser memory
						xml_parser_free($xml_parser);

						// Loop though all the items

						for ($i = 0; $i < ($maxitemcount); $i++)
						{
							// Check feed Log
							// Generate the hash for the log
							if(!isset($context['feeditems'][$i]['title']) || !isset($context['feeditems'][$i]['description']) || !isset($context['feeditems'][$i]['link']))
								continue;


							$itemhash = md5($context['feeditems'][$i]['title'] . $context['feeditems'][$i]['description']);
							$request = db_query("
							SELECT
								feedtime
							FROM {$db_prefix}feedbot_log
							WHERE feedhash = '$itemhash'", __FILE__, __LINE__);

							mysql_freeresult($request);

							// If no has has found that means no duplicate entry
							if (db_affected_rows() == 0)
							{

								// Create the Post
								$msg_title = $func['htmlspecialchars'](($feed['html'] ? $context['feeditems'][$i]['title'] : strip_tags($context['feeditems'][$i]['title'])), ENT_QUOTES);

								$msg_body =  $func['htmlspecialchars'](($feed['html'] ? $context['feeditems'][$i]['description'] . "\n\n" . $context['feeditems'][$i]['link']  : strip_tags($context['feeditems'][$i]['description'] .  "\n\n" . $context['feeditems'][$i]['link'])), ENT_QUOTES);



								$msgOptions = array(
									'id' => 0,
									'subject' => $feed['topicprefix'] . $msg_title,
									'body' => '' . $msg_title . "\n\n" . $msg_body,
									'icon' => 'xx',
									'smileys_enabled' => 1,
									'attachments' => array(),
								);
								$topicOptions = array(
									'id' => 0,
									'board' => $feed['ID_BOARD'],
									'poll' => null,
									'lock_mode' => $feed['locked'],
									'sticky_mode' => null,
									'mark_as_read' => true,
								);
								$posterOptions = array(
									'id' => $feed['ID_MEMBER'],
									'name' => $feed['postername'],
									'email' => '',
									'update_post_count' => (($feed['ID_MEMBER'] == 0) ? 0 : 1),
								);

								createPost($msgOptions, $topicOptions, $posterOptions);

								// Add Feed Log
								$fid = $feed['ID_FEED'];
								$ftime = time();

								db_query("
								INSERT INTO {$db_prefix}feedbot_log
									(ID_FEED, feedhash, feedtime)
								VALUES
									($fid,'$itemhash',$ftime)", __FILE__, __LINE__);

							}
						}

					 } // End valid XML check



			}  // End get feed data

		} // End expire check


	} // End for each feed

}

function GetRSSData($url)
{
	$url_array = parse_url($url);

	if(function_exists("curl_init"))
	{
		// Last but not least try cUrl
		$ch = curl_init();

		// set URL and other appropriate options
		curl_setopt($ch, CURLOPT_URL, $url);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

		// grab URL, and return output
		$output = curl_exec($ch);

		// close curl resource, and free up system resources
		curl_close($ch);
		return $output;
	}


	// Failure return false
	return false;

}

function startElement1($parser, $name, $attrs)
 {
	global $insideitem, $tag;
	if ($insideitem)
	{
		$tag = $name;
	}
	elseif ($name == "ITEM")
	{
		$insideitem = true;
	}
}

function endElement1($parser, $name)
{
	global $insideitem, $tag, $feedcount, $context;

	if ($name == "ITEM")
	{
		$feedcount++;
		$context['feeditems'][$feedcount] = array();
		$context['feeditems'][$feedcount][] = array();
		$context['feeditems'][$feedcount]['title'] = '';
		$context['feeditems'][$feedcount]['description'] = '';
		$context['feeditems'][$feedcount]['link'] = '';
		$insideitem = false;
	}
}

function characterData1($parser, $data)
 {
	global $insideitem, $tag,  $feedcount, $context, $maxitemcount;

	if ($insideitem && $feedcount < $maxitemcount)
 	{
		switch ($tag)
		{
			case "TITLE":
				$context['feeditems'][$feedcount]['title'] .= $data;
			break;

			case "DESCRIPTION":
				$context['feeditems'][$feedcount]['description'] .= $data;

			break;

			case "LINK":
				$context['feeditems'][$feedcount]['link'] .= $data;
			break;
		}
	}
}
?>
__________________
Don't let you stop you ;)
sote is offline  
Old 01-06-2008, 11:42 PM   #3 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 





You can use my simple curl :
http://www.tugasku.com/download/sour....class.php.txt

It is pretty easy to use
__________________
xrvel is offline  
Old 01-07-2008, 12:32 AM   #4 (permalink)
New Member
Join Date: Jan 2008
Posts: 5
_khAttAm_ is an unknown quantity at this point
 



you can even disable the error reporting by writing code
error_reporting(0);
to disable the error message only!!
_khAttAm_ is offline  
Old 01-07-2008, 01:23 AM   #5 (permalink)
Senior Member
Join Date: Jul 2005
Posts: 1,492
newsiness has much to be proud ofnewsiness has much to be proud ofnewsiness has much to be proud ofnewsiness has much to be proud ofnewsiness has much to be proud ofnewsiness has much to be proud ofnewsiness has much to be proud ofnewsiness has much to be proud of
 


AIDS/HIV Save a Life
Originally Posted by _khAttAm_
you can even disable the error reporting by writing code
error_reporting(0);
to disable the error message only!!
I think it is not advisable to disable the error reporting...try to fix the errors if there are any...IMHO
__________________
||||newsiness.com||||'""|""\__,_
| _[lol]___[lol]____ l ||__|__|)
|(@)(@)"""""""**|(@)(@)**|(@) 100% Free Online Flash games
newsiness is offline  
Old 01-07-2008, 01:50 AM   #6 (permalink)
NamePros Member
Join Date: Jul 2006
Posts: 94
sote is a jewel in the roughsote is a jewel in the roughsote is a jewel in the rough
 



If you want to keep the fopen() code in the script, you could just comment it out. Add // before the lines you want to remove. Or enclose the code as a multiline comment using /* code */
__________________
Don't let you stop you ;)
sote is offline  
Old 01-07-2008, 02:09 AM   #7 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
Originally Posted by newsiness
I think it is not advisable to disable the error reporting...try to fix the errors if there are any...IMHO
Agreed 100%. If you ignore errors you could find that your script breaks. An error can affect many things.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 01-07-2008, 06:37 AM THREAD STARTER               #8 (permalink)
Senior Member
 
DJ-Sound's Avatar
Join Date: May 2004
Posts: 1,814
DJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud ofDJ-Sound has much to be proud of
 



Thanks! Rep added, works great.
DJ-Sound is offline  
Old 01-07-2008, 07:51 AM   #9 (permalink)
New Member
Join Date: Jan 2008
Posts: 5
_khAttAm_ is an unknown quantity at this point
 



In this case


Originally Posted by peter@flexiwebhost
Agreed 100%. If you ignore errors you could find that your script breaks. An error can affect many things.
Yeah, but In this case, the errors are handled properly and if error occours, another option is automatically chosen, so ignoring errors should not be a problem....
_khAttAm_ is offline  
Old 01-07-2008, 10:17 AM   #10 (permalink)
Danltn.com
 
Daniel's Avatar
Join Date: May 2007
Location: Danltn.com / Nottingham, UK
Posts: 1,201
Daniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond repute
 


Ethan Allen Fund Ethan Allen Fund
Originally Posted by xrvel
You can use my simple curl :
http://www.tugasku.com/download/sour....class.php.txt
????: NamePros.com http://www.namepros.com/programming/415011-resolved-fopen-to-curl-help.html

It is pretty easy to use
That's nice code - Is it public domain, and if not - what license?

Dan
Daniel is offline  
Old 01-07-2008, 08:34 PM   #11 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 





Originally Posted by Danltn
That's nice code - Is it public domain, and if not - what license?
????: NamePros.com http://www.namepros.com/showthread.php?t=415011

Dan
Thank you, Dan. It is my domain. I coded it, i don't know about license (GPL i think). But you can use my curl code

Kurniawan.
__________________
Last edited by xrvel; 01-07-2008 at 08:43 PM.
xrvel is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 09:28 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger