|
All times are UTC |
|
|
Page 1 of 1 |
[ 3 posts ] |
| Print view | Previous topic | Next topic |
| Author | Message |
|---|---|
|
Joined: Wed Jun 18, 2008 9:36 pm Posts: 4 |
hello I would like to know how to do that when importing a feed with rss importer if he has image this importe through image upload
thanks |
| Sun Jul 06, 2008 8:29 pm |
|
|
Site Admin Joined: Wed Dec 12, 2007 9:34 pm Posts: 296 |
Hi software,
If the individual stories within the feed you are pulling into pligg via the importer have images then it should be possible in a ruond about way using pligg's EXTRA FIELDS, and thats only if the feeds allow the images to be grabbed. You would not however be able to use the image upload module in any part of this process, the module allows users to upload images which are stored on your pligg installs server. It would not however be able to scrape an image from the feed and upload that image automatically. Hope that helps m8 |
| Mon Jul 07, 2008 6:33 pm |
|
|
Joined: Wed Jun 18, 2008 9:36 pm Posts: 4 |
hello maybe you or someone wants to help me to inctegrate img upload to rss importer
The idea is this: when executed rss importer, and the rss "content" is included in the BD spend that variable through this script that takes pictures and then load the server and then call to img upload to create the img, Code: <?php function recibe_imagen ($url_origen,$archivo_destino){ $mi_curl = curl_init ($url_origen); $fs_archivo = fopen ($archivo_destino, "w"); curl_setopt ($mi_curl, CURLOPT_FILE, $fs_archivo); curl_setopt ($mi_curl, CURLOPT_HEADER, 0); curl_exec ($mi_curl); curl_close ($mi_curl); fclose ($fs_archivo); } include_once("../snoopy.class.php"); include_once("../htmlsql.class.php"); $wsql = new htmlsql(); // connect to a file if (!$wsql->connect('file', 'demo_data.htm')){ print 'Error while connecting: ' . $wsql->error; exit; } /* execute a query: This query extracts all links from the document and just returns href (as url) and text */ if (!$wsql->query('SELECT src as url, text FROM img')){ print "Query error: " . $wsql->error; exit; } // show results: foreach($wsql->fetch_array() as $row){ $via= str_replace( "http://www.pligtorrent.com" , "",$row['url']); $url='http://www.pligtorrent.com'.$via; print '<b>'.$url.'</b></br>'; recibe_imagen("$url","./iimagen.jpg"); } ?> include_once("../snoopy.class.php"); include_once("../htmlsql.class.php"); These are some php classes that we used to extract the url of the images that are in the content of rss http://www.jonasjohn.de/lab/htmlsql/?ur ... &q2=9&q3=0 the proces is the next 1-rss importer get the content 2-if the content have img tags, trough this in a $variable to the script. 3-the script take the url of al img, we have to define wach we wont to up (if are more than 1 ) 4-up the img to our server: we can avoid call to img upload, taking the settings of img module and rename the img for example img_158 and 5-or we can pass this trogh img upload (i dont know hw) thaks! if you wont to contactme fran_scrapy@hotmail.com |
| Tue Jul 08, 2008 5:36 pm |
|
|
|
Page 1 of 1 |
[ 3 posts ] |
|
All times are UTC |
Who is online |
Users browsing this forum: No registered users and 0 guests |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum |

