urgent help needed

Started on the old forum in December 2010 · view the original in the archive · old links redirect here

4 replies · 457 views · started 15 years ago · 1 min read

2 participants
tricky Junior · 36 posts #1

in my sea script the image preview not got.pls help.it is fine working in http ://magicmobi.tk but not in http://trickyWAP.com pls help .

something else Fellow · 2,296 posts #2

waves a magic wand 😛 ... have you got GD Library installed on server?

tricky Junior · 36 posts #3

When i checking php info gd GD Support enabled GD Version bundled (2.0.34 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.2.1 GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XPM Support enabled XBM Support enabled

Where is the problem the im.php code is

<?php #-----------------------------------------------------# # ============ЗАГРУЗ-ЦЕНТР============= # # Автор : Sea # # E-mail : [x-sea-x@ya.ru](mailto:x-sea-x@ya.ru) # # ICQ : 355152215 # # Вы не имеете права распространять данный скрипт. # # По всем вопросам пишите в ICQ. # #-----------------------------------------------------# // mod Gemorroj require 'moduls/config.php'; header('Content-type: image/jpeg'); header('Cache-Control: public'); header('Pragma: cache'); $W = intval($_GET['W']); $H = intval($_GET['H']); $id = intval($_GET['id']); $file_info = mysql_fetch_row(mysql_query('SELECT TRIM(`path`) FROM `files` WHERE `id` = ' . $id)); $pic = urldecode(htmlspecialchars($file_info[0])); if (substr($pic,0,1) != '.') { $type = strtolower(pathinfo($pic, PATHINFO_EXTENSION)); if ($type == 'gif') { $old = imagecreatefromgif($pic); } else if ($type == 'jpg' || $type == 'jpeg' || $type == 'jpe') { $old = imagecreatefromjpeg($pic); } else if ($type == 'png') { $old = imagecreatefrompng($pic); } else { exit; } $wn = imagesx($old); $hn = imagesy($old); $prew = 1; if (!$W || !$H) { $prew = 0; $size = explode('*', $setup['prev_size']); $W = round(intval($size[0])); // ширина картинки $H = round(intval($size[1])); // высота картинки } $sxy = round($wn / $hn, 3); if ($sxy < 1) { $W = intval($H * $sxy); } else { $H = intval($W / $sxy); } $new = imagecreatetruecolor($W, $H); imagecopyresampled($new, $old, 0, 0, 0, 0, $W, $H, $wn, $hn); if ($setup['marker'] && $prew) { // фон $bg = imagecolorallocate($new, 255, 255, 255); // цвет $color = imagecolorallocate($new, 200, 200, 200); imagestring($new, 2, ($W / 2) - (strlen($setup['text_marker']) * 3), 1, $setup['text_marker'], $color); } imagejpeg($new,'',100); if ($prew) { mysql_query('UPDATE `files` SET `loads`=`loads`+1, `timeload`=' . $_SERVER['REQUEST_TIME'] . ' WHERE `id`=' . $id); } } ?>

Pls help any Php Experts?

tricky Junior · 36 posts #4

This script is working fine but it is from another script .How can i use this script for Sea Help Please?

<?php ############################################################# ############################################################# ### Çàãðóç-Öåíòð ZaC v1.0 ### ### Àâòîð: WapStyle ### ### Ñàéò: <http://wap.irbit.in> ### ### e-mail: [admin@wap.irbit.in](mailto:admin@wap.irbit.in) ### ############################################################# ############################################################# ### Âû ÍÅ èìååòå ïðàâî ïðîäîâàòü ýòîò ñêðèïò èëè ### ### ïîëó÷àòü êàêóþ-ëèáî âûãîäó. ### ### Âû ÍÅ èìåòå ïðàâî âíîñèò èçìåíåíèÿ â äàííûé êîä ñêðèïòà ### ############################################################# ############################################################# ### Áîëüøàÿ ïðîñüáà íå ÓÄÀËßÉÒÅ ÊÎÏÈÐÀÉÒ! ### ### Âñ¸ ðàâíî ýòî íå ññûëêà! ### ############################################################# ############################################################# include('func.php'); include('setup.php'); $time=time(); $neww=intval(@$_GET['x']); $newh=intval(@$_GET['y']); if(!$neww or !$newh) { $neww=intval(@$_POST['x']); $newh=intval(@$_POST['y']); } if(!$neww or !$newh) exit; $pr=intval(@$_POST['pr']); if(!$pr) $pr=intval(@$_GET['pr']); if($neww>1600 or $neww<1) $neww=130; if($neww>1600 or $neww<1) $neww=130; $file=htmlspecialchars($_GET['file']); if(substr($file, 0,5)=='load/') { list($sx,$sy, $type,)=@getimagesize($file); $sxy=round($sx/$sy,3); $swh=round($neww/$newh,3); if(!$pr) { if($sxy<$swh) $neww=intval($newh*$sxy); else $newh=intval($neww/$sxy); } //print "$sxy $swh"; //print "$neww $newh $sx $sy"; if ($type==1) {$funci='imagecreatefromgif';} //$funco="imagegif";} if ($type==2) {$funci='imagecreatefromjpeg';} //$funco="imagejpeg";} if ($type==3) {$funci='imagecreatefrompng';} //$funco="imagepng";} if($type) { $im1 = @$funci($file); $im2=@imagecreatetruecolor($neww,$newh); @imagecopyresized($im2, $im1, 0,0,0,0,$neww,$newh, @imagesx($im1), @imagesy($im1)); @header('Content-type: image/gif');@imagegif($im2);} } ?>
something else Fellow · 2,296 posts #5

make sure there is no spaces or new lines after ?> also do same for moduls/config.php

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close