-
Posts
9153 -
Joined
-
Last visited
-
Days Won
146
Everything posted by Byron
-
A friend of mine wrote this and it's still kind of a work in progress as you can see stuff commented out but this is what he's got so far. Requires the font below. http://byrondallas.heliohost.org/php/fonts/lokicola.ttf <?php $rand = rand(1, 100000); $file = "$rand.logo.gif"; $font = "lokicola.ttf"; if ( $_GET ) { $w = $_GET[w]; $h = $_GET[h]; $f = $_GET[f]; # number of frames $size = $_GET[size]; $delay = $_GET[del]; if ($f < 1) { $move = 0; $f = 1; } else { $move = $w/$f; } # new imagick object $img = new Imagick(); # remove NULL's from colors foreach ($_GET[c] as $temp ) { if ( strlen($temp) > 0 ) { $colors[] = $temp; } } # how many colors? $n = count($colors); # make gradients till next to last color for ($x=0; $x<$n-1; $x++) { $next = $x+1; $gradient = "gradient:$colors[$x]-$colors[$next]"; $img->newPseudoImage( 100, 100, "$gradient" ); } # loop last color back to first color $last = $n-1; $gradient = "gradient:$colors[$last]-$colors[0]"; $img->newPseudoImage( 100, 100, "$gradient" ); # go back to top of stack and append $img->resetIterator(); $bar = $img->appendImages(true); # rotate & resize $bar->rotateImage(new ImagickPixel(), 270); # $bar->scaleimage($w, $h, FALSE ); # new object for frames $frames = new Imagick(); for ($x=0; $x<$f; $x++) { # roll, resize and add to frames $bar->rollimage( $move, 0 ); $bar->scaleimage($w, $h, FALSE ); $frames->addimage($bar); $frames->setImageDelay("$delay"); } if ($_GET[swirl] == "on") { $m = max( array($w,$h) ); foreach ($frames as $temp) { /* if ($_GET[transbg] == "on") { $temp->setimagebackgroundcolor("transparent"); $temp->setImageVirtualPixelMethod( imagick::VIRTUALPIXELMETHOD_TRANSPARENT ); } */ $temp->scaleimage($m, $m, FALSE ); $temp->distortImage( Imagick::DISTORTION_ARC, array( 361 ), TRUE ); $temp->swirlimage( max(0,$_GET[deg]) ); $temp->scaleimage($w, $h, FALSE ); } } ############################ if ($_GET[reverse] == "on") { foreach ($frames as $temp) { $orig = $temp->clone(); $flop = $temp->clone(); $flop->flopImage(); $orig->addimage($flop); $orig->appendImages(false); #$temp->destroy(); #$temp = new Imagick(); #$temp->addimage($orig); } } ############################ /* ############################ if ($_GET[reflect] == "on") $reflection = new Imagick(); foreach ($frames as $temp) { { $orig = $temp->clone(); $flop = $temp->clone(); # $temp->removeimage(); # debug $orig = $temp->clone(); $flop->flopImage(); $reflection->addimage($orig); $reflection->addimage($flop); # $temp->destroy(); # $temp = new Imagick(); # $temp->addimage($orig); # $temp->addimage($flop); $reflection->appendImages(false); $temp->setImageFormat('gif'); $flop->setImageFormat('gif'); $reflection->setImageFormat('gif'); #$new->setImageFormat('gif'); header( "Content-Type: image/gif" ); echo $reflection; exit; } #$reflection->resetIterator(); #$reflection->appendImages(true); $reflection->writeimages( "$file", TRUE); header( "location:$file" ); } ############################## */ ############################## if ($_GET[txt] == "on") { $logo = new Imagick(); foreach ($frames as $temp) { $logo->newimage($w,$h, "transparent"); $draw = new ImagickDraw(); $draw->setfont("$font"); # set font $draw->setfillcolor("#0000ff"); $draw->setgravity(imagick::GRAVITY_CENTER); $draw->setFontSize( $size ); # annotate #$draw->annotation( 0, 0, "$_GET[text_entered]" ); $logo->annotateImage ( $draw,0 ,0, 0, "$_GET[text_entered]" ); $logo->drawImage( $draw ); $logo->compositeImage( $temp, imagick::COMPOSITE_ATOP, 0,0 ); } $logo->setImageFormat('gif'); $logo->writeimages("$file", TRUE); header( "location:$file" ); exit; } ############################## # set the image format to gif $bar->setImageFormat('gif'); # Write final image $frames->writeimages("$file", TRUE); header( "location:$file" ); exit; } ?> <html> <head><title>Rainbow Text Maker</title></head> <body> <form> <input type="text" name="w" size="3" value="500"> Width<br> <input type="text" name="h" size="3" value="100"> Height<br> <input type="text" name="size" size="3" value="90"> Font Size<br> <input type="text" name="f" size="3" value="10"> Frames<br> <input type="text" name="del" size="3" value="3"> Delay<br> Colors<br> <input type="text" name="c[]" value="#ff0000"><br> <input type="text" name="c[]" value="#ff8800"><br> <input type="text" name="c[]" value="#ffff00"><br> <input type="text" name="c[]" value=""><br> <input type="text" name="c[]" value="#00ff00"><br> <input type="text" name="c[]" value=""><br> <input type="text" name="c[]" value="#00ffff"><br> <input type="text" name="c[]" value="#0088ff"><br> <input type="text" name="c[]" value="#0000ff"><br> <input type="text" name="c[]" value="#8800ff"><br> Options:<br> <input type="checkbox" name="swirl" checked> Swirl <input type="text" size="3" name="deg" value="99"> Degrees <br> <input type="checkbox" name="txt" checked> Text: <input type="text" name="text_entered" value=""> <br> <input type="submit"><br> </form> </body> </html>
-
Ok I sent it to you again.
-
Didn't I also PM you the password? I just tried logging into your cpanel with that same password and it worked for me.
-
Have you been to the link at your cpanel named "Default Address" under the mail column and follow the instructions?
-
You could also use an include to include your cron file so each time a visitor visited your site it would run the cron script.
-
Ok I've emailed you your new password.
-
If I reset your password and email it to the email address you registered with, will you get it? Is that a valid email address?
-
You can't have a cron job run every hour. Your only allowed 2 cron runs a day.
-
Please post your username and domain name.
-
Restoring my CPanel Full Backup from home directory
Byron replied to Rostamiani's topic in Customer Service
You shouldn't have any problems ftping it to your home directory but you'll have problems when you go to untar the backup. It won't restore your files like you think it would. According to the cpanel backup instructions you'll need djbob's help. Especially if you have sub domains, mail, parked domains, etc. Escalating... Unescalating... I see you edited your post Geoff. -
Yes it's working fine now. The blankness just meant that it converted the pdf to two jpg's in the same directory. Thank you very much!
-
I'm seeing your directory index. Refresh your browsers cache.
-
Do we still have Ghostscript installed on Stevie? We had a customer awhile back request it but it doesn't seem to be working now. This is the error I get when trying to convert a pdf file: http://byrondallas.heliohost.org/php/imagick/thumbnail2.cgi Here's the old thread when you first installed it djbob: http://www.helionet.org/index/index.php?sh...ic=4611&hl=
-
Thanks jje. I should have the script that I originally posted finished by tomorrow that has forms. You would just type in for instance "index.html" in the file form and then the changes you want to make in the Search and Replace forms and it will change all of your index.html files on your site with a click of the submit button.
-
You can run this php script in each of your directories. Just make sure you don't already have any files with this line in them: error_reporting(0); or it will repeat it again. This will look for any files ending in .php and add error_reporting(0); to them: <?php $search = "<?php"; $replace = "<?php\nerror_reporting(0);"; foreach (glob("*.php") as $file) { # open the file to get existing content $current = file_get_contents($file); # search and replace $fwrite = str_replace("$search", "$replace", $current); # write the contents back to the file file_put_contents($file, $fwrite); echo "<span style=\"color:#000080;\">$file</span><br>"; echo "<span style=\"color:#000060;\">Searched for:</span> <span style=\"background:lightyellow; color:#000060;\">$search</span><br>"; echo "<span style=\"color:#000060;\">replaced with:</span> <span style=\"background:lightyellow; color:#000060;\">$replace</span><br><br>"; } ?>
-
Yeah I found a bug in my script and I wanted to fix it before I fixed the link. Right now everytime I search for this tag in a php script: <?php and try to replace it with: <?php error_reporting(0); I get this: <?<?php error_reporting(0); For the life of me i can't figure out why it's replacing the php tag like that. Only happens on that tag though?
-
Here's a script I wrote to edit several files at once. http://byrondallas.heliohost.org/mystuff/adjust_files.txt Put as file name: .php (looks for all files ending in .php) Search: <?php Replace: <?php error_reporting(0);
-
This support request is being escalated to our root admin.
-
All you need to do, or have your registrar do, is point your domain to our nameservers which are: ns1.heliohost.org ns2.heliohost.org We can't do this for you. And of course you need to register an account with us with that domain name.
-
[Solved] Random suPHP_ConfigPath Probelm?
Byron replied to UpdatedOffers's topic in Escalated Requests
Escalating... @djbob: Are we allowing custom php.ini files on Johnny? -
Since I don't know anything about python all I can do is give you a script to try: #!/usr/bin/env python3.2 import cgi cgi.test() import sys ver = sys.version_info print("</br>Python Version:") print(str(ver.major)+'.'+str(ver.minor)+"."+str(ver.micro)) http://dallas.heliohost.org/cgi-bin/python32.py
-
[Solved] Random suPHP_ConfigPath Probelm?
Byron replied to UpdatedOffers's topic in Escalated Requests
We don't allow you to use a custom php.ini file, so I doubt that yours is working. I can't say if that was causing the 500 errors, but everybody experiences 500 errors from time to time because of high server load. -
Give me a minute and I'll reset your password and email it to the email address you registered with.
-
Unable to reactivate account after periodic suspension
Byron replied to timecop's topic in Customer Service
Ok your all set to go. Refresh your cache if you still see the Suspended page. -
Did you try using all lowercase?
