View Full Version : Automatic Gallery Adder ...
xApster
06-26-2001, 03:42 PM
I am looking for a program that will update 5 of my tgps from 1 page ?
Basicly everyone from the 5 different tgps submit to the same submiter.. each day i make a page with all the galleries and catagories and then i press a button and each tgp gets update with the sepcicfic galleries needed as well as the ucj code added and a few blind links.
Is there any program around that can do that ?
Thanks
totalpics
06-26-2001, 06:06 PM
I know of a cgi script that can do what you are asking. hit me up on icq and we can talk about it. My icq is 106774088
harvey
06-26-2001, 08:35 PM
http://cgi.resourceindex.com
http://php.resourceindex.com/
http://perlzone.net/info/dailygallery.html (requires cjpeg, djpeg, and pnmscale but if you don't have is quite easy to get)
Xapster, that can easily be done with a php3 script. Chmod all the tgp html files to 666, then have a php script write to all of them. Something like this -
<?php
$dest[1] = "full path to your tgp file1"
$dest[2] = "full path to your tgp file2"
$dest[3] = "full path to your tgp file3"
$tag = "whatever text you want replaced with your gallery listing"
$galleries will be the html version of the gallery listings, probly inputted by your gallery checking script or read from a gallery.html file you upload
$i = 0;
while ($i < 3) {
$file = fread($fp = fopen($dest, 'r'), filesize($dest[$i])); fclose($fp);
$file = ereg_replace($tag, $galleries, $file);
if($fp = @fopen($dest, 'w')){fwrite($fp, $file);fclose($fp);}
else{echo "Could not open file";}
$i++;
}
?>
This can be modified to do whatever you want if you know a bit of programming.
toker
06-28-2001, 04:12 AM
Uh why not just use SSI??
Use your script to export all the gallerys to a single html or text file then use
<!--#include file="http://pathto/page.htm"-->
That will do the trick and you wont even have to push a button or configure a script.
I always find it better to modify the html file instead of it depeding on another file or on pulling up stuff from a database.
xApster
06-28-2001, 10:26 AM
Thanks for the help.
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.