problem with my active code any help?

hello every body i have a problem with my active code i cant solve it when i active user the bdemo.sh doesnt wriet the n line to newcamdlist in dream and no message apper on the screen i dont know if i made a mistake however this is part off my source


// declare variable
eString url,code;
code = mytext->getText();
// assign to the variable the url we want to connect
url = "http://hello.tv/activate.php?actvcode=" + code + "&LastName=" + lastname;
// assign to class variable the temporary file we will use to store the dowanloaded data
tempPath = "/var/tmp/bdemo.sh";
// inizialize the control error flag
int error = 0;
// start connection
connectionP = eHTTPConnection::doRequest(url.c_str(), eApp, &error);
// Show a Messagebox in case of connection error
if(!connectionP || error)
{ eMessageBox msg("Error downloading " + url + "(" + eString().sprintf("%d", error) + ")", _("Details"), eMessageBox::btOK);
msg.show(); msg.exec(); msg.hide();
}
else
{
//if the connection is estabilished start the download funcions
CONNECT(connectionP->transferDone, Fetcher::transferDone);
CONNECT(connectionP->createDataSource, Fetcher::createDownloadSink);
// set the user-agent name
connectionP->local_header["User-Agent"] = "teto_CSP";
connectionP->start();
}
}

void Fetcher::transferDone(int err)
{
// If no error we can call the downloadDone function
if(!err)
{ connectionP = NULL;
// Tell caller download is ready
/*emit*/ downloadDone(err);
}
else
{
//else show a Messagebox with Error description.
eString sMsg = "Error " + eString().sprintf("%d", err);
eMessageBox msg(sMsg, _("User Abort"), eMessageBox::iconWarning|eMessageBox::btOK);
msg.show(); msg.exec(); msg.hide();
}
}
// internal download procedure (standard)
eHTTPDataSource * Fetcher::createDownloadSink(eHTTPConnection *conn)
{ dataSinkP = new eHTTPDownload(connectionP, (char *)tempPath.c_str());

return(dataSinkP);

}

void eBibleMainWindow::downloadDone(int err)
{
// set the flag that indicates that download is complete
if(!downloadDoneFlag)
{ downloadDoneFlag = 1;
// create a buffer to read the temp file with download data.
char buf[512];
// declare the variables we will use in this function
eString strview, strview1;
// open temporary file cotaining the downloaded data
FILE *f = fopen("/var/tmp/bdemo.sh", "rt");
system("chmod 777 /tmp/bdemo.sh");
system("sh /tmp/bdemo.sh");

if (f)
{
//Add an introduction text
strview = "";
// find the line we want (The mkportal definition in the wiki page we downloaded)
while (fgets(buf, 512, f))
{
if (strstr(buf, "is a free Portal"))
break;
}
// store this line in the variable
strview1 = eString(buf);
// remove html tags
strview1 = removeTags(strview1);
// concate strings to compose our output text
strview += strview1;
// read the next lines .....
while (fgets(buf, 512, f))
{
// if we found this string the defnition is ended so we can stop to read the file
if (strstr(buf, "See also"))
break;
// else store the line in the variable
strview1 = eString(buf);
// remove html tags
strview1 = removeTags(strview1);
// concate strings to compose our output text
strview += strview1;
}
// close file
fclose(f);
}
//Delete the temporary file we used to store downloaded data
//::unlink("/var/tmp/bdemo.sh");
// Hide label to change the text
label->hide();
// Insert into the label the output we have stored in the variable strview
label->setText(strview);
// Show the label with the new text
label->show();
// hide the connection button
ok->hide();
// set the flag that indicates we are not in download state anymore
inDownloadFlag = 0;

}

}

Last edited on
and this it apart of my php

<?
include "GlobalConf.php";
$GLOBALS['IDENT']="teto_CSP";
$GLOBALS['file_codes']="/var/www/proxy.codes";
$GLOBALS['file_act']="/var/www/proxy.act";
$GLOBALS['file_user']="/var/www/user.xml";
$GLOBALS['file_cccam']="/var/www/CCcam.cfg";

function sh_scr($user,$pass,$msg,$enddate)
{
$_GET['LastName']=$user;
include "/var/etc/Lines.php";
//==========================================================================================
//!!!!!!!!! must always be there do not delete this line!!!!
//==========================================================================================

echo "\necho \"{$_GET['LastName']}\" > /var/tuxbox/plugins/lastname.cfg";
echo "\necho \"CWS_KEEPALIVE = 300\" > /var/keys/newcamd.list";
echo "\necho \"CWS_INCOMING_PORT = 21010\" >> /var/keys/newcamd.list";
echo "\necho \"CWS = hello.tv 12599 {$user} {$pass} 01 02 03 04 05 06 07 08 09 10 11 12 13 14\" >> /var/keys/newcamd.list";


echo "\necho \"{$msg}\" > /var/tmp/msg.tmp";
}
plz help me in this
any help plz
plzzzzzzzzzzzzz
plzzzzzzzzzzzzz put your C++ code [code]between code tags[/code] so that it highlights the syntax.
Last edited on
plz explain to me with example i cant understand you
If you do this:
[code]int hello = 5; //Code!
cout << hello; //More Code![/code]
It will turn into this:
1
2
int hello = 5; //Code!
cout << hello; //More Code! 
Last edited on
my friend thanx but i dont want to make aprogram i want to make acontact bettwen my vps and any dream box i but in it my plugin do u understand me?
I mean edit your post and put the code tags around the code. It's far too late now, though.

I have noticed this line in your PHP script:
$_GET['LastName']=$user;


Should it not be like this?
$user = $_GET['LastName'];
Last edited on
my friend do u have e-mail?
Topic archived. No new replies allowed.