cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I got myself a database containing a dictionary but I need to convert the abbreviations to full words (eg. n=noun). Does anybody know where I will find the abbreviations for parts of speech and what they stand for?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

we hope there is intelligent life somewhere out in space
coz theres bugger all down here on earth

Monty Python

It is said that intelligent life is forever being created and destroyed around the universe. But just when intelligent life gets an understanding of the universe then something like a black hole dooms them all. That is what I saw on a TV show.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

That is only one line of code that needs altering. Surly you could alter the below line to suit your needs.

$result[]=($output[1][$i]*$output[2][$i]*60);
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

That means the file does not exist. If you wish not to see the error an alternative would be curl.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Ow, I did the opposite and place the time into the brackets. That is even easier. The following code will do the trick.

<?php
$input='hello you are (1:45) ----- hello test (3:30) ';
//edit above

$result=array();
preg_match_all('#\(([0-9]+)\:([0-9]+)\)#',$input,$output);
for ($i=0;$i<count($output[0]);$i++) {
$result[]=($output[1][$i]*$output[2][$i]*60);
}

echo '<xmp>';
print_r($result);
echo '</xmp>';
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Is this what your after?

<?php
$input='hello you are () ----- hello test () ';
$input2=array('(1:45)','(3:30)');
//edit above

$arr=explode('()',$input);
$result='';
for ($i=0;$i<count($arr);$i++) {
if (isset($input2[$i])) {
    $result.=$arr[$i].$input2[$i];
    } else {
    $result.=$arr[$i].'()';
    }
}
$result=substr($result,0,-2);

echo $result;
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Not as simple as I first thought but working on it...

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The other topics are still open but nobody seems to be interested. I wonder why?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I thought you'd near to cURL to avoid frame problem - anyway couldn't get your code to fly. Doesn't return anything.

Doesn't return anything... That annoying google making things difficult. digital-either made a good post some time ago and posted the following api.

/**
 * Translating language with Google API
 * @author gabe@fijiwebdesign.com
 * @version $id$
 * @license - Share-Alike 3.0 (http://creativecommons.org/licenses/by-sa/3.0/)
 * 
 * Google requires attribution for their Language API, please see: http://code.google.com/apis/ajaxlanguage/documentation/#Branding
 * 
 */
class Google_Translate_API {

	/**
	 * Translate a piece of text with the Google Translate API
	 * @return String
	 * @param $text String
	 * @param $from String[optional] Original language of $text. An empty String will let google decide the language of origin
	 * @param $to String[optional] Language to translate $text to
	 */
	function translate($text, $from = '', $to = 'en') {
		$url = 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q='.rawurlencode($text).'&langpair='.rawurlencode($from.'|'.$to);
		$response = file_get_contents(
			$url,
			null,
			stream_context_create(
				array(
					'http'=>array(
					'method'=>"GET",
					'header'=>"Referer: http://".$_SERVER['HTTP_HOST']."/\r\n"
					)
				)
			)
		);
		if (preg_match("/{\"translatedText\":\"([^\"]+)\"/i", $response, $matches)) {
			return self::_unescapeUTF8EscapeSeq($matches[1]);
		}
		return false;
	}
	
	/**
	 * Convert UTF-8 Escape sequences in a string to UTF-8 Bytes
	 * @return UTF-8 String
	 * @param $str String
	 */
	function _unescapeUTF8EscapeSeq($str) {
		return preg_replace_callback("/\\\u([0-9a-f]{4})/i", create_function('$matches', 'return html_entity_decode(\'&#x\'.$matches[1].\';\', ENT_NOQUOTES, \'UTF-8\');'), $str);
	}
}

Then to use it

$text = 'Welcome to my website.';
$trans_text = Google_Translate_API::translate($text, '', 'it');
if ($trans_text !== false) {
	echo $trans_text;
}

However it is limited on how much data you can input. Not to say how many translation requests you can …

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I'm starting to believe you own something called the Daily Workbook of Inflammatory Issues and you're going through it page by page.

What does that mean? Does that mean you think I have a book listing sensitive topics? No - I just question the world we live in.

[edit]
Now I think about it we could be in like a matrix and I must be like that guy who just didn't think think life was right. The one.
[/edit]

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Do you believe international animal rights laws should be introduced just like how there are human rights laws? IMO, clones are like animals since their not a creation of god or evolution and giving animals the same rights as humans would mean clones would also have the same rights as humans. But there is also things like whale hunting which would never happen if animals had the same rights as humans. Hopefully there is a poll on this topic as it is my first voting poll and lets see what you have to say...

ahihihi... commented: (^.^)yes +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Then what your after is regex. Post me a few text files before insert and after insert then I shall write you the script.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

This is a quote from my website

On an advanced content management system, you may want to offer a feature to convert text into different languages. Well I have created a script which uses the google translator to translate your data and send the translation to your website. So first copy the below function into the header of your php file.

function translate($sentence,$languagefrom,$languageto)
{
$homepage = file_get_contents('http://translate.google.com/translate_t');
if ($homepage==false) {$homepage='';}
preg_match_all("/<form[^>]+ction=\"\/translate_t\".*<\/form>/",$homepage,$botmatch);
$botmatch[0][0]=preg_replace("/<\/form>.*/",'',$botmatch[0][0]);
preg_match_all("/<input[^>]+>/",$botmatch[0][0],$botinput);
$id=0;
while (isset($botinput[0][$id]))
	{
	preg_match_all("/value=(\"|'|[^\"'])[^\"']+(\"|'|[^\"'])?( |>|	)/",$botinput[0][$id],$tmp);
	$tmp[0][0]=preg_replace('/((\'|")?[^\'"]+)/','$1',$tmp[0][0]);
	$tmp[0][0]=preg_replace('/(\'|")/','',$tmp[0][0]);
	$tmp[0][0]=preg_replace('/.*value=/i','',$tmp[0][0]);
	$len=strlen($tmp[0][0]);
	$len-=1;
	$tmp[0][0]=substr($tmp[0][0],0,$len);
 
	preg_match_all("/name=(\"|'|[^\"'])[^\"']+(\"|'|[^\"'])?( |>|	)/",$botinput[0][$id],$tmpname);
	$tmpname[0][0]=preg_replace('/((\'|")?[^\'"]+)/','$1',$tmpname[0][0]);
	$tmpname[0][0]=preg_replace('/(\'|")/','',$tmpname[0][0]);
	$tmpname[0][0]=preg_replace('/.*name=/i','',$tmpname[0][0]);
	$len=strlen($tmpname[0][0]);
	$len-=1;
	$tmpname[0][0]=substr($tmpname[0][0],0,$len);
 
	if (strlen($tmpname[0][0])>0 && !in_array($tmpname[0][0],array('text','sl','tl')))
		{
		$vars.=$tmpname[0][0]."=".$tmp[0][0].'&';
		}
	unset($tmp);
	unset($tmpname);
	$id+=1;
}
$curl_handle=curl_init('http://translate.google.com/translate_t');
curl_setopt($curl_handle, CURLOPT_HEADER, true);
curl_setopt($curl_handle, CURLOPT_FAILONERROR, true);
curl_setopt($curl_handle, CURLOPT_HTTPHEADER, 
Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15") );   
curl_setopt($curl_handle, CURLOPT_POST, true);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $vars.'text='.$sentence.'&sl='.$languagefrom.'&tl='.$languageto);
curl_setopt($curl_handle, CURLOPT_NOBODY, false);
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,false);
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
 
$buffer=strip_tags($buffer,'<div>');
preg_match_all("/\<div id\=result_box dir\=\"[^\"]+\"\>[^<]+\<\/div\>/",$buffer,$match);
$match[0][0]=strip_tags($match[0][0]);
return $match[0][0];
}

Then to use the translator, you call the function like below and below is an example of english to chinese:

echo translate('This is the text','en','zh-CN');

The first field in the above function is the text to convert, second field language from, third field is language to. All languages are abbrievated. So below are the abbrievations you may use and that is it. It is as simple as that.

ar = Arabic
bg = Bulgarian
ca = Catalan
zh-CN = Chinese
hr = Croatian
cs = Czech
da = Danish
nl = Dutch
en = English
tl = Filipino
fi = Finnish …
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Could you explain exactly what you are trying to achieve. Perhaps php can do the job without the need for shell access. I noticed something about bc and saw some numbers on the same line. So are you just trying to use the bc math library because php has a bc math extension.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Your post is a bit unclear on which picture you want the result to look like. If you want the result as a table then that can be achieved by a simple while loop and a html table. If however you are trying to generate an image with the circles then I would suggest looking at the gd library.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Do you mean like this?

<?php
echo '<xmp>'; //show pure html instead of styling
echo file_get_contents('http://www.daniweb.com/');
echo '</xmp>';
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Perhaps something like this.

onclick="javascript: document.form.currency.value='euro'; document.form.action=\"index.php?currency=euro\"; document.form.submit();"

Then in php

<?php
session_start();
if (isset($_GET['currency']) && !empty($_GET['currency'])) {
$_SESSION['currency']=$_GET['currency'];

$v=explode('?','http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],2);
$v[1]=str_replace('currency='.$_GET['currency'],'',$v[1]);
$v[1]=trim(str_replace('&&','&',$v[1]),'&?');
$j=$v[0];
$j.=(empty($v[1]))?'':'?'.$v[1];
header('Location: '.$j);
exit;
}

That should assign the session it's value on submit then redirect back.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

When you have your first grand-child.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

GOD to these type of ugly Reptilians? do you going to worship for
them to become a slave? http://www.greatdreams.com/reptlan/reps.htm

I just read that page and almost sent me blind reading it. Who would design a page with a bright red background and white text? Is this your page by any chance !o!.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I have been asking for some time to move forum28 to it's own main forum in web development instead of being a subforum of web design but it seems everybody has been confused about what I am talking about. So I've now started my own thread... Anyways, it seems that Graphics and Multimedia (forum28) is more than just web design but cover a wide area such as 3d modeling, cad, flash so that is why I was asking if it is possible to move forum28 (Graphics & Multimedia forum) up a level so it appears just below the web development category instead of the web design category. Then the forum will be more accessible and you might even get more visits in that forum since it would then be in the top grey menu.

Above is my main question but if you have the time to spare then please read the below...

In addition I thought I would mention about the php code tag. It could be improved a little while not urgent. I notice the php code tags do not notice the difference between html and php. Shouldn't the php code tags have in its algorithm set so that inside <?php and ?> is php code and all other code is html code? Also note both html and php can be used in the same script. Just would make some code cleaner on the php forums.

Thanks...
cwarn23

diafol commented: good idea +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try making this line 58 and 59

$qry='SELECT * FROM employee WHERE username="'.mysql_real_escape_string($login).'" AND passwd="'.mysql_real_escape_string(md5($_POST['password'])).'"';
$result=mysql_query($qry) or die(mysql_error());

I have added some debugging functions which should help resolve the error.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

it is nor workin sorry.....

I know it's not working but did that bring up new errors. Also you may want to look into the copy() function.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

That error again, grr. I have read about it and if the file begins with a crc32 hash (I think) then php will end up just dumping an error. Although I have experienced this error myself it doesn't seem to be very common. I think the solution would be to replace the move_uploaded_file() with a custom function and also I would suggest trying the following to see if you get any other error messages too...

<?php
ini_set('upload_max_filesize','1000M');
$target = "uploads/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
move_uploaded_file($_FILES['uploaded']['tmp_name'], $target);
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

thank you for the helping but it doesn't upload flv files

Could you please describe in detail what happens when you try to upload. Are their any error messages and if so what messages are shown.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Was that code to read the dll because if it was then I guess I will have to go to the gamemaker community to see why my dll won't work on gamemaker. It is like if the program reading the dll doesn't like arrays.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well the answer is you can send to mysql 32MB at a time. That is 33,554,432 characters/letters/digits. So make sure the length of all your mysql query's do not go beyond 32MB and re-establish the mysql connection just before 32MB has been breached.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

What two parameter strings are you passing to that function so that I can test it ?

If you like here is the official documentation. And the first param is what to search for. And in the second param it is the string to split and splits at every occurrence of param 1. But although I can use std::cout to output the correct results without the dll, as soon as I turn the project into a dll the function returns value[0]="0"; and nothing else. For example, the below exe code works.

#include <iostream>
#include <sstream>
std::string *explode (std::string exploder, std::string original, int limit=0) {
	std::string tmp;
	tmp=original;
	int num, loc, x, limiter;
	limiter=0;
	num=1;
	while (tmp.find(exploder)!=std::string::npos) {
		if (limiter==limit && limit!=0) { break; }
		if (limit>0) { limiter++; }
		loc=tmp.find(exploder);
		tmp=tmp.substr(loc+exploder.length());
		num++;
		}
	std::string *result;
	x=(num+1);
	result = new std::string[x];
	std::string s;
	std::stringstream out;
	out << x;
	s = out.str();
	result[0]=s;
	num=1;
	tmp=original;
	while (tmp.find(exploder)!=std::string::npos) {
		if (limiter==limit && limit!=0) { break; }
		if (limit>0) { limiter++; }
		loc=tmp.find(exploder);
		result[num]=tmp.substr(0,loc);
		tmp=tmp.substr(loc+exploder.length());
		num++;
		}
	result[num]=tmp;
	return result;
}
int main() {
	std::string *tmp;
	tmp=explode(".","a.b");
	std::cout << tmp[0] << "--" << tmp[1] << "-" << tmp[2] << std::endl;
	system("PAUSE");
	return 0;
}

But as soon as I turn it into a dll then tmp[1] and tmp[2] will nolonger exist and tmp[0] will equal "0" even with the same inputs but input dynamically from another program.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well for some reason the code in post #1 returns only value[0]="0"; but doesn't return anything else. Even if I change the first array value it is still zero. Any reason for this unusual behavior?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hi and I thought I would write an algorithm where the computer can learn from text being input into its database and the computer will be able to have a normal conversation with somebody. I already have my database of paragraphs but will need converting into something more complex for the computer to understand. Does anybody know the science behind computer generated sentences as I have already written an algorithm that determines what is information and what is gap filling text? Also does anybody know where I can download a mysql database containing a row for every word in the english language and a second column for weather each word is a noun/verb/adjective etc.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The Sumerians were sitting around wondering what the guy in a beard was on about - what does he mean "Let there be light" - there's the sun yadda,yadda,yadda.

lol. That is a very good point. Does that mean that the so called God created all of the stars/suns at once because light doesn't just come from the sun - light also comes from the stars. Amazing the things the author of the bible didn't think of. Anyways back on topic didn't some scientists recently create some experiment where they sent two particles near the speed of light and tried to collide those particles. I know the first attempt failed due to a malfunction but how did the second attempt go?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Sounds like you've got something like cPanel? See screenshot.

You can probably get your heart server address from inserting something like:

<?php echo "Server address: " . $_SERVER['SERVER_ADDR'];?>

into one of your pages.

Now take the address and place it into your cpanel.

I'm no expert on this - I'm assuming a bit here.

I Agree totally. In that picture shows where you enter in the remote host(s). There may be more than one in this situation depending on the isp setup. I have done this setup myself and is very simple. First in the site with mysql like ardave said you will need to enable remote hosts. The first remote host will be %.website_without_database.com and notice it uses the subdomain %. Remember to replace the domain with your real domain. Then in the below script replace the host (first parameter) with the website that contains your database. Then enter your username and password. Then run the script and follow the next step.

<?php
mysql_connect('website_with_mysql.com','username','password') or die(mysql_error());

For example, if I were doing a remote host to my website it would look something like this (password is different though)

<?php
mysql_connect('cwarn23.net','root','abc987zyx') or die(mysql_error());

Now you will probably see an error. The error will say that it cannot access the database due to some security violation. To solve this copy and past the host name in the message into the box ardave pointed out. Now you should have 2 remote hosts set in your cpanel. Then you may need to run the above …

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

It looks like the cron is getting the php file raw, before it is actually processed by the php interpreter. Not familiar enough with cron to know how to fix. Any thoughts?

The usual method of setting a cron job is a simple command line like the following:

php /home/<user>/public_html/cron.php

The above cron command will execute cron.php in the base of the users web directory and remember to replace <user> with your username for cpanel login.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

We don't create new forums until the demand is proven - which means anyone suggesting such a thing needs to go and dig out a volume of recent threads to show us which support the claim that the forum is required in the first place.

I know this is solved but I wasn't asking to create any new forums but instead to move an existing forum to a place where it is more accessible.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try replacing line 59 with the following.

$result=mysql_query($qry) or die(mysql_error());
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

No wonder why the computer can't find the answer. The answer is so big the not even 64-bit can store the number. Instead there is a fatal error. Too many digits for the computer to read the answer or even process the answer...

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Post #4 isn't exactly what I planned to do. I am trying to recreate the php library meaning the inputs would need to stay the same as the documentation. But I'm just not sure on how to return a string array. Does anybody know the basics behind making a string array without a pointer?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I want it to be automatically and I don't have to get backup every time.
Please help me with that.

Then I guess the easiest way to backup automatically is to make a computer generated php file. Simply retrieve the data from the database and add it to a string in the format which will execute as a php file. Hope that helps...

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try the following:

<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000000000" />
Please choose a file: <input name="uploaded" type="file" /><br />
<input type="submit" value="Upload" />
</form>
<?php
ini_set('upload_max_filesize','1000M');
$target = "uploads/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploaded']['name']). " has been uploaded";
}
else {
echo "Sorry, there was a problem uploading your file.";
}
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Didn't you bother to look at the problem line (line 44)?

>>result[0]="1";

result is a std::string, therefore you can not set the first character to a string. It should be result = "1";

It is meant to be a string array and so in the array the first key contains the string "1". Then the computer generates the rest of the array results. So is there a different way I am meant to do it?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

There is a nice tizag tutorial I would suggest following. Basically all you need to do is set a html form which will post files to the server. Then after uploading the server can validate. That is after uploading the server validates as many people get confused with this. And when the file is uploaded, the location of the file can be recorded into a mysql database for later access. Enjoy the tutorial.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Couldn't you just use phpmyadmin to export your database as a .sql file or is there a reason behind having a custom script for the export. Phpmyadmin comes with most servers.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Chances are your server has different settings or may not even have ffmpeg installed so what I would suggest is contacting your web host and asking for the ffmpeg configuration details and change your localhost ffmpeg to the same as the online server configurations. Then you will need to adjust your script accordingly.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I'm drinking Pepsi then after that I will be drinking a recycled windows vista drink.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Energy cannot be destroyed , it can only change forms, so universe was there before concept of time came in and it will continue to be there after concept of time vanishes.

While energy cannot be created or destroyed, there is nothing to say energy can't be transfered. What if our universe was the result of an ancient experiment in an alternate universe. I have heard of a theory where there are infinite universes containing every possible combination outcome and there is the other theory where there is only one alternate universe also called the parallel universe. So logically something in the parallel universe would have created time making the energy outside the timeframe/space of all alternate universes transform into a new universe. For all we know new universes could be created like new galaxies.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I wonder how hard it would be to Macgyver a way to fast forward time so I can get a faster computer cheaper. That would be fun.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I don't want to download anything but instead want to be able to have a php script that can access rainbow table(s) from remote websites. The thing is I don't know of any websites that provide an online rainbow table service. The one you mentioned I would have to download the tables then upload them to my website...

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

hi and welcome to daniweb. Next time please start a new topic instead of bumping a really old topic. As for the problem, there is probably a bug in your query. So try replacing line 201 and 202 with the following

$query = mysql_query($sql) or die(mysql_error()); 
$nume = mysql_num_rows($query); // --> line 202
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Although you increased the memory limit and execution time I bet you didn't do the same for mysql. To do such a processing job you would need to change the memory limit and execution time for both mysql and php. Sounds like you only did it for php. Not sure how to do it for mysql though. I am guessing the memory limit for mysql would be 32MB so if you closed the connection and reopened the connection every so often in the loop then that should solve your problem. For example:

<?php
$link=mysql_connect('localhost','root','');
mysql_select_db('database',$link);

for ($i=0;$i<100000;$i++) { //change condition
if (($i/500)==round($i/500)) {
    mysql_close($link);
    sleep(2); //let cpu decrease
    $link=mysql_connect('localhost','root','');
    mysql_select_db('database',$link);
    }
//do stuff in here
}

The above is a rough idea of what it should look like and hope it helps.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Anybody?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I just tried the below code but got the below error.

//#pragma warning(disable:4996) //disable "depreciated function" warnings
#include <windows.h> //required for dll
#include <sstream>
#define DLLEXPORT __declspec ( dllexport )


BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	return TRUE;
}

 DLLEXPORT std::string explode (std::string exploder, std::string original, int limit=0) {
	std::string tmp;
	tmp=original;
	int num, loc, x, limiter;
	limiter=0;
	num=1;
	while (tmp.find(exploder)!=std::string::npos) {
		if (limiter==limit && limit!=0) { break; }
		if (limit>0) { limiter++; }
		loc=tmp.find(exploder);
		tmp=tmp.substr(loc+exploder.length());
		num++;
		}
	std::string result;
	x=(num+1);
	//result = new std::string[x];
	/*std::string s;
	std::stringstream out;
	out << x;
	s = out.str();
	result[0]=s;*/
	result[0]="1";
	num=1;
	tmp=original;
	while (tmp.find(exploder)!=std::string::npos) {
		if (limiter==limit && limit!=0) { break; }
		if (limit>0) { limiter++; }
		loc=tmp.find(exploder);
		result[num]=tmp.substr(0,loc);
		tmp=tmp.substr(loc+exploder.length());
		num++;
		}
	result[num]=tmp;
	return result;
}

And the error was...

1>------ Build started: Project: gm_php, Configuration: Debug Win32 ------
1>Compiling...
1>main.cpp
1>c:\documents and settings\owner\my documents\visual studio 2008\projects\gm_php\gm_php\main.cpp(44) : error C2440: '=' : cannot convert from 'const char [2]' to 'char'
1> There is no context in which this conversion is possible
1>c:\documents and settings\owner\my documents\visual studio 2008\projects\gm_php\gm_php\main.cpp(51) : error C2440: '=' : cannot convert from 'std::basic_string<_Elem,_Traits,_Ax>' to 'char'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>,
1> _Ax=std::allocator<char>
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>c:\documents and settings\owner\my documents\visual studio …