
xdrixn
Alfa
Verificado por Whatsapp
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Muy buen tema
Gracias por el tutorial, muy bien explicado
Gracias por el tutorial, muy bien explicado
🔒 Este tema está cerrado para nuevas respuestas.
⏰ Solo el creador del tema puede solicitar la reapertura de sus propios temas, pero únicamente dentro de los 60 días previos a la última actualización.
[MENTION=9679]cicklow[/MENTION] Esta muyy bueno el script🙂🙂. Pero te hago una consulta.. Que posibilidades hay de que por cada imagen sacada de tumblr se asocie con 1 link de promo distinta?? Hay que hacer muchos cambios?
poder se puede, solo hay que agregar los links de promos en una array he ir agregandolos a cada imagen
<?php
require 'simple_html_dom.php';
$url = 'http://localhost/PRUEBAS/imagenes.html'; //<--- De aca saco las imagenes
$html = file_get_html( $url );
$parse1 = $html->find('div[class=fotos] a');
$parse2 = $html->find('div[class=fotos] img');
$img ="";
$href = "";
//Extraigo los HREF
foreach($parse1 as $pars1){
$preHref = $pars1->href;
//echo $href."<br>";
$href= $preHref.','.$href;
}
//Extraigo los IMG
foreach ($parse2 as $pars2) {
$preImg = $pars2->src;
//echo $img."<br>";
$img = $preImg.','.$img;
}
$imgarr = explode(',', $img , -1);
$hrefarr = explode(',', $href,-1);
//Array listos, se aplica reverse dado que me los muestra al revés
$reverse_imgarry = array_reverse($imgarr); //<--- IMAGEN
$reverse_hrefarry = array_reverse($hrefarr); // <---- PROMO
Sera mucho pedirte que me des una mano??
Lo que estoy tratando de hacer es generar ingresos con las webs que pagan por visitar las imágenes, siempre desde mi blog con el trafico que venga desde sex[dot]com..
Entonces, diseñe esto...
Insertar CODE, HTML o PHP:<?php require 'simple_html_dom.php'; $url = 'http://localhost/PRUEBAS/imagenes.html'; //<--- De aca saco las imagenes $html = file_get_html( $url ); $parse1 = $html->find('div[class=fotos] a'); $parse2 = $html->find('div[class=fotos] img'); $img =""; $href = ""; //Extraigo los HREF foreach($parse1 as $pars1){ $preHref = $pars1->href; //echo $href."<br>"; $href= $preHref.','.$href; } //Extraigo los IMG foreach ($parse2 as $pars2) { $preImg = $pars2->src; //echo $img."<br>"; $img = $preImg.','.$img; } $imgarr = explode(',', $img , -1); $hrefarr = explode(',', $href,-1); //Array listos, se aplica reverse dado que me los muestra al revés $reverse_imgarry = array_reverse($imgarr); //<--- IMAGEN $reverse_hrefarry = array_reverse($hrefarr); // <---- PROMO
El tema es que tengo miedo de tocar algo en el auto.php y romper todo.. Recién estoy aprendiendo PHP, mas bien programación en general, se un poquito de cada cosa.
Si te fijas al ultimo tengo 2 arrays, el de las imágenes y el de las promos (el link a la imagen grande con publicidad, ej: imgchili).
Esto lo podría llamar dentro desde el auto.php con un include, pero la verdad se me hace un lio sobre que modificar en tu código.
include('tucodedeobtenerlinks.php');
//obtener keys
$KEYS = preg_split("|[\r\n]+|i", file_get_contents($_POST['keys']), -1, PREG_SPLIT_NO_EMPTY);
if($KEYS[0]=="") die('El archivo de las keys ('.$_POST['keys'].') no puede ser leido correctamente! guardar como UTF8!');
$B[1] = $reverse_imgarry;
foreach($B[1] as $Ki=>$C){
shuffle($KEYS);
$TITULO = $KEYS[array_rand($KEYS,1)];
if(!file_exists('cache/'.md5($C))){
// create a new entry object
// populate it with user input
$uri = 'http://www.blogger.com/feeds/' . $__id . '/posts/default';
$entry = $service->newEntry();
$entry->title = $service->newTitle(ucfirst($TITULO));
$entry->content = $service->newContent('<center><a href="'.$reverse_hrefarry[$Ki].'" target="_blank"><img src="'.$C.'"></a></center><br /><!--more--><br />'.DameReKeys($KEYS));
$entry->published = $service->newPublished(date(DATE_ATOM,time()));
$entry->category = array($service->newCategory($KEYS[0],'http://www.blogger.com/atom/ns#'), $service->newCategory($KEYS[1], 'http://www.blogger.com/atom/ns#'));
$entry->content->setType('text');
// save entry to server
// return unique id for new post
$response = $service->insertEntry($entry, $uri);
$arr = explode('-', $response->getId());
$id = $arr[2];
if($posteo['sex.com']){
$POSTSEX = Postear($A_BLOGURL[$_POST['ID']],$C,$A_SEXID[$_POST['board']],$_POST['tags']);
if(stripos($POSTSEX,"Congratulations! Your pin has been added")!==false) echo "Posteado en sex.com - "; else{ echo 'No se pudo postear en sex.com - '; @file_put_contents($FILEDS1, "Posteo: ".$POSTSEX."\n\n".str_repeat("--", 10)."\n\n", FILE_APPEND); }
}
if($posteo['pinsex.com']){
$POSTPIN = PostearPinSex($A_BLOGURL[$_POST['ID']],$C,$_POST['tags'],$A_PINSEI[$_POST['board2']],$TITULO);
if(stripos($POSTPIN,"isRedirect")!==false) echo "Posteado en pinsex.com - "; else{ echo 'No se pudo postear en pinsex.com - '; @file_put_contents($FILEDS2, "Posteo: ".$POSTPIN."\n\n".str_repeat("--", 10)."\n\n", FILE_APPEND); }
}
echo 'Posteado en blogger: ' . $id.'<br/>';
file_put_contents('cache/'.md5($C),'');
sleep(5);
}else{
echo 'La imagen: '.md5($C).' ya fue posteada antes!<br/>';
}
}
....
if($posteo['sex.com']){
$POSTSEX = Postear($A_BLOGURL[$_POST['ID']],$C,$A_SEXID[$_POST['board']],$_POST['tags']);
if(stripos($POSTSEX,"Congratulations! Your pin has been added")!==false) echo "Posteado en sex.com - "; else{ echo 'No se pudo postear en sex.com - '; @file_put_contents($FILEDS1, "Posteo: ".$POSTSEX."\n\n".str_repeat("--", 10)."\n\n", FILE_APPEND); }
}
if($posteo['pinsex.com']){
$POSTPIN = PostearPinSex($A_BLOGURL[$_POST['ID']],$C,$_POST['tags'],$A_PINSEI[$_POST['board2']],$TITULO);
if(stripos($POSTPIN,"isRedirect")!==false) echo "Posteado en pinsex.com - "; else{ echo 'No se pudo postear en pinsex.com - '; @file_put_contents($FILEDS2, "Posteo: ".$POSTPIN."\n\n".str_repeat("--", 10)."\n\n", FILE_APPEND); }
}
En este pedazo el @file_put_contents($FILEDS1, ..... no debería cambiarlo?? Pregunto sin entenderlo? jajaaPHP:.... if($posteo['sex.com']){ $POSTSEX = Postear($A_BLOGURL[$_POST['ID']],$C,$A_SEXID[$_POST['board']],$_POST['tags']); if(stripos($POSTSEX,"Congratulations! Your pin has been added")!==false) echo "Posteado en sex.com - "; else{ echo 'No se pudo postear en sex.com - '; @file_put_contents($FILEDS1, "Posteo: ".$POSTSEX."\n\n".str_repeat("--", 10)."\n\n", FILE_APPEND); } } if($posteo['pinsex.com']){ $POSTPIN = PostearPinSex($A_BLOGURL[$_POST['ID']],$C,$_POST['tags'],$A_PINSEI[$_POST['board2']],$TITULO); if(stripos($POSTPIN,"isRedirect")!==false) echo "Posteado en pinsex.com - "; else{ echo 'No se pudo postear en pinsex.com - '; @file_put_contents($FILEDS2, "Posteo: ".$POSTPIN."\n\n".str_repeat("--", 10)."\n\n", FILE_APPEND); } }
Array ( [0] => http://cualquierhostxx/5rj6d83a844c/0_copia.jpg.html [1] => http://cualquierhostxx/ovyujgf619pr/1_copia.jpg.html [2] => http://cualquierhostxx/9kmpctksad8d/2_copia.jpg.html [3] => http://cualquierhostxx/7lg9qa2lpwhb/3_copia.jpg.html [4] => http://cualquierhostxx/qmhccofonkmc/4_copia.jpg.html [5] => http://cualquierhostxx/38fq7jzu4bxb/5_copia.jpg.html [6] => http://cualquierhostxx/o094hfr2bye4/6_copia.jpg.html [7] => http://cualquierhostxx/xxk7ddkf7tm4/7_copia.jpg.html [8] => http://cualquierhostxx/b6uxn3s45qga/8_copia.jpg.html [9] => http://cualquierhostxx/6ozizd7ptqyq/9_copia.jpg.html [10] => http://cualquierhostxx/v5isidsarjj8/10_copia.jpg.html [11] => http://cualquierhostxx/xmwyhcf5uaor/11_copia.jpg.html [12] => http://cualquierhostxx/lap8tqba1oxs/12_copia.jpg.html [13] => http://cualquierhostxx/ubliqiyy0rne/13_copia.jpg.html [14] => http://cualquierhostxx/kph9khlc4nxl/14_copia.jpg.html [15] => http://cualquierhostxx/95gbe2dq5ct8/15_copia.jpg.html [16] => http://cualquierhostxx/fq9k1mwbvr8n/16_copia.jpg.html [17] => http://cualquierhostxx/mq6c37iqm5is/18_copia.jpg.html [18] => http://cualquierhostxx/w529n7fypczr/19_copia.jpg.html [19] => http://cualquierhostxx/s0bs8gg4u073/20_copia.jpg.html [20] => http://cualquierhostxx/gkrc6dxxhehu/21_copia.jpg.html [21] => http://cualquierhostxx/e0jhh21etehg/22_copia.jpg.html [22] => http://cualquierhostxx/ppt2eczj5do7/23_copia.jpg.html [23] => http://cualquierhostxx/123411mrkpk4/24_copia.jpg.html [24] => http://cualquierhostxx/a78h3pgw9jtu/25_copia.jpg.html [25] => http://cualquierhostxx/hs5km4q0mt0o/26_copia.jpg.html )
Array ( [0] => http://cualquierhostxx/i/00071/5rj6d83a844c_t.jpg [1] => http://cualquierhostxx/i/00071/ovyujgf619pr_t.jpg [2] => http://cualquierhostxx/i/00071/9kmpctksad8d_t.jpg [3] => http://cualquierhostxx/i/00071/7lg9qa2lpwhb_t.jpg [4] => http://cualquierhostxx/i/00071/qmhccofonkmc_t.jpg [5] => http://cualquierhostxx/i/00071/38fq7jzu4bxb_t.jpg [6] => http://cualquierhostxx/i/00071/o094hfr2bye4_t.jpg [7] => http://cualquierhostxx/i/00071/xxk7ddkf7tm4_t.jpg [8] => http://cualquierhostxx/i/00071/b6uxn3s45qga_t.jpg [9] => http://cualquierhostxx/i/00071/6ozizd7ptqyq_t.jpg [10] => http://cualquierhostxx/i/00071/v5isidsarjj8_t.jpg [11] => http://cualquierhostxx/i/00071/xmwyhcf5uaor_t.jpg [12] => http://cualquierhostxx/i/00071/lap8tqba1oxs_t.jpg [13] => http://cualquierhostxx/i/00071/ubliqiyy0rne_t.jpg [14] => http://cualquierhostxx/i/00071/kph9khlc4nxl_t.jpg [15] => http://cualquierhostxx/i/00071/95gbe2dq5ct8_t.jpg [16] => http://cualquierhostxx/i/00071/fq9k1mwbvr8n_t.jpg [17] => http://cualquierhostxx/i/00071/mq6c37iqm5is_t.jpg [18] => http://cualquierhostxx/i/00071/w529n7fypczr_t.jpg [19] => http://cualquierhostxx/i/00071/s0bs8gg4u073_t.jpg [20] => http://cualquierhostxx/i/00071/gkrc6dxxhehu_t.jpg [21] => http://cualquierhostxx/i/00071/e0jhh21etehg_t.jpg [22] => http://cualquierhostxx/i/00071/ppt2eczj5do7_t.jpg [23] => http://cualquierhostxx/i/00071/123411mrkpk4_t.jpg [24] => http://cualquierhostxx/i/00071/a78h3pgw9jtu_t.jpg [25] => http://cualquierhostxx/i/00071/hs5km4q0mt0o_t.jpg )
Notice: Undefined index: promo in D:\xampp\htdocs\auto\auto.php on line 37
Notice: Undefined index: promo in D:\xampp\htdocs\auto\auto.php on line 37
Notice: Undefined index: promo in D:\xampp\htdocs\auto\auto.php on line 37
Notice: Undefined index: promo in D:\xampp\htdocs\auto\auto.php on line 37
Notice: Undefined index: promo in D:\xampp\htdocs\auto\auto.php on line 37
Notice: Undefined index: promo in D:\xampp\htdocs\auto\auto.php on line 37
Notice: Undefined index: promo in D:\xampp\htdocs\auto\auto.php on line 37
Notice: Undefined index: promo in D:\xampp\htdocs\auto\auto.php on line 37
Notice: Undefined index: promo in D:\xampp\htdocs\auto\auto.php on line 37
Notice: Undefined index: promo in D:\xampp\htdocs\auto\auto.php on line 37
Notice: Undefined index: promo in D:\xampp\htdocs\auto\auto.php on line 37
Notice: Undefined index: tags in D:\xampp\htdocs\auto\auto.php on line 106
Warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\auto\sex.php on line 35
¡A mi 34! 5 tenían mas de 2000 entradas. ¡Aparentemente mas de 10000 fotos que enlazaban a un solo link llamaron la atención! :witless:
🔒 Este tema está cerrado para nuevas respuestas.
⏰ Solo el creador del tema puede solicitar la reapertura de sus propios temas, pero únicamente dentro de los 60 días previos a la última actualización.