![](https://xisto.com/discuss/uploads/set_resources_4/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
TavoxPeru
-
Content Count
865 -
Joined
-
Last visited
Posts posted by TavoxPeru
-
-
Well done, but, i take the liberty to optimize your codethis is the script that I use to resize image..
<?php$a = "images/".$_GET['src'];$b = $_GET['w'];$ext = explode(".",$_GET['src']);$ext = end($ext);$ext = strtolower($ext);if ($ext == "jpg") { header ("Content-type: image/jpeg"); }else if ($ext == "gif") { header ("Content-type: image/gif"); }else if ($ext == "png") { header ("Content-type: image/png"); }if ($ext == "jpg") { $img_src=imagecreatefromjpeg($a); }else if ($ext == "gif") { $img_src=imagecreatefromgif($a); }else if ($ext == "png") { $img_src=imagecreatefrompng($a); }$size = getimagesize($a);if ($b >= $size[0]) $b = $size[0];$c = round($b * $size[1] / $size[0]);$img_dst=imagecreatetruecolor($b,$c);imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $b, $c, $size[0], $size[1]);if ($ext == "jpg") { imagejpeg($img_dst, "", 100); }else if ($ext == "gif") { imagegif($img_dst); }else if ($ext == "png") { imagepng($img_dst); }imagedestroy($img_dst);?>
using my script, the image will show with ?src=image_name&w=image_widththe images are store in /images directory..
this is the example:
here is my version:
<?php$a = "images/".$_GET['src'];$b = $_GET['w'];$ext = explode(".",$_GET['src']);$ext = end($ext);$ext = strtolower($ext);$size = getimagesize($a);if ($b >= $size[0]) $b = $size[0];$c = round($b * $size[1] / $size[0]);$img_dst=imagecreatetruecolor($b,$c);if ($ext == "jpg") { header ("Content-type: image/jpeg"); $img_src=imagecreatefromjpeg($a);imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $b, $c, $size[0], $size[1]);imagejpeg($img_dst, "", 100); }else if ($ext == "gif") { header ("Content-type: image/gif"); $img_src=imagecreatefromgif($a);imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $b, $c, $size[0], $size[1]);imagegif($img_dst);}else if ($ext == "png") { header ("Content-type: image/png"); $img_src=imagecreatefrompng($a);imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $b, $c, $size[0], $size[1]);imagepng($img_dst); }imagedestroy($img_dst);?>
Best regards,
-
I like banners number 3 and 5, and maybe number 6 but its to big.best regards,
-
Thanks for the share, i just test it and as you say is very fast, it would very helpful in situations like for example when you travel and you dont have any option to store big files. Definitely it goes to my favorites.best regards,
-
The solution that vujsa offers is very simple and powerful, another way to do it i think is by using the location object of javascript, something like this:
<a href="#" onclick="top.location.href='<?php echo $_GET['page']; ?>'">Remove this Frame</a>
Best regards, -
Well, whatever was wrong with my account now have been corrected and nothing lost to report
thanks a lot admins.Best regards,
-
I still have problems with my account, and cant login to anything.
Best regards,
-
Well, finally my client decide not to use this approach. What i do is simply change it to a standard login script using a form with a text box and a password box and all works very fine, so sorry dudes, i hope sometime i could complete this approach. For me, it is an incomplete task that i must finish soon.Best regards,PS: please admins let me know if i'm doing wrong when i post again and if the correct way was simply to include this in my previous post.
-
Thanks dude, a lot of time i waste searching something like this, is very simple, and also it demostrates me what i was doing bad in my script.Hi! I found this Newsletter System, based on TXT files, not MySQL. It is VERRY simple. Here is the instructions:
----------------------------------------------
|### Newsletter System 1.0 L.E. ###|
----------------------------------------------
Leandro Maniezo
lemaniezo@ig.com.br
TRANSLATION FROM PORTUGUESE-BR TO ENGLISH:
Alexandre Cisneiros Filho
misteryoshi@gmail.com
Introduction
----------
- Put line-by-line the adresses on the file emails_bd.txt.
- Set the permitions of the txt files to be writebly.
- After sendin, all the adresses who recived the message are stored at log.txt.
- If some people dont recive the message, deleta all adresses on the file emails_bd that are in log.txt and send again.
Instaling
----------
- Put all the files in a folder on the site and set the permitions to the TXT files.
Obs.: NO Javascript allowed.
If you want to send images, you need to host them.
Just download the attached file!
best regards,
-
In my case, i notice that my account is suspended, i really dont know why
BTW, my domain is: http://forums.xisto.com/no_longer_exists/
Best regards, -
Thank you very much TavoxPeru. It worked.
In the statement that has ORDER BY in it ...
why is the there both a " (quotes) and a ' (apostrophe) ?
Sorry my understanding of PHP is very new.
In PHP and SQL, the " and the ' are use to specify strings literals like the $query variable, in this specific case you are creating a SQL statement that will select some links of a category type whick also is a string, thats why you use this.Best regards,
-
Thanks for the info, its really amazing all the things that the hUman can create, i hope that i never be infected by this malware, yes yes, i know, i ask too mUchIn order to show that malicious software is present even without OS security holes, researchers have developed a prototype of malware that cannot be detected. It is invisible even on Windows Vista, which is supposed to be fully protected from these kinds of attacks. The concept Blue Pill, which is the prototype name, uses AMD's SVM/Pacifica virtualization technology and enables complete take-over of the operating system. The user is not aware of this, because everything happens without the computer being restarted, even without lowering the computer performance.
Blue Pill doesn't use bugs in the OS, and can be used on other operating systems, such as Linux and FreeBSD that are on a 64bit platform. Even though this was just a demonstration, not detecting malware is a big problem. Fortunately, the problem (and the solution, hopefully) has been sighted long before attacks will appear.
BTW, a few months ago i lost my 30GB HD especially becaUse of downloading torrents, i know that i can find good things in this format but my experience told me that the risk to get some virri is very high.
Best regards,
-
To order alphabetically simply remove the quoutes of your order by clause, and also delete your second $query variable assignment because if you dont do it, this will replace your first assignment.My query is returning a list of manufacturers with a hyperlink to their web site.
I would like to LIST them alphabetically but can't seem to figure it out. Can someone lend me a hand?<?php // Query the Database $specific_value = 'Industrial';$query = "SELECT * FROM table_links WHERE cat='" . mysql_real_escape_string($specific_value) . "' ORDER BY 'manufacturer' ASC";$query = "SELECT * FROM table_links WHERE cat = '" . mysql_real_escape_string($specific_value) . "'";$result = mysql_query($query);if(!$result) die("ERROR: " . mysql_error());while($row = mysql_fetch_array($result)) { echo '<a href="'.$row['mfr_url'].'">'.$row['manufacturer'].'</a><br>'; } ?>
Your statement will be:<?php // Query the Database$specific_value = 'Industrial';$query = "SELECT * FROM table_links WHERE cat = '" . mysql_real_escape_string($specific_value) . "' ORDER BY manufacturer ASC";$result = mysql_query($query);if(!$result) die("ERROR: " . mysql_error());while($row = mysql_fetch_array($result)) { echo '<a href="' . $row['mfr_url'] . '">' . $row['manufacturer'] . '</a><br>'; }?>
Best regards,
-
Sounds good but right now there exists a lot of sites like yours, i think that the only way that your site would success is by offering good contents and also to permit your users to email directly without any restriction. best regards,
-
Hi, this simple one line script changes the image size and source on your thumbnail picture without reloading the page or using popups, just paste this code into the BODY section of your HTML document:
<img src="yourimage.jpg" width="150" height="200" onclick="this.src='yourimage.jpg';this.height=400;this.width=300" ondblclick="this.src='yourimage.jpg';this.height=200;this.width=150">
Best regards,
edit: adding the missing ' of the src on the ondblclick event.
-
I view this behavior in many sites, i think they do it with the use of an iframe, so you will have 2 pages, one main page and one with your links. Lets view it with an example.
mainpage.htm:
<html><head><title>Main Page</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head><body><!-- here you can put whatever you want --><!-- set your iframe whatever you want --><iframe src="linkspage.htm" name="target_iframe"></iframe></body></html>
linkspage.htm:<html><head><title>Links Page</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head><body><a href="http://forums.xisto.com/&; target="_self">Xisto</a><br /><a href="https://www.google.com/&%2334; target="_self">Google</a><br /><a href="http://forums.xisto.com/no_longer_exists/; target="_self">Yahoo</a><br /></body></html>
I'm not 100% sure if it is the way they implement this but this example works fine.Best regards,
-
Thanks for share this site, i just test it very quickly and the results are excellent, as you said it is very useful.Best regards,
-
Yes you are right, it is another solution but many host servers for security reasons disable this functions so you can't use it.Or use a system call?
Best regards,
-
Ok, thanks a lot, i will put this in practice right now.First of all: that's really handy calculator. Thanks for posting TavoxPeru. No. Em sizes are relational. So if user changes font size in his browser, Ctrl+MouseScroll or View->Font Size in IE, all the fonts are resized proportionally. So headers "<hX>" are increased in size proportianlly as much as the normal text.
If you have set the font size as absolute pixels, the IE, for example, refuses to change it. The font size is set in the code and the browser won't render it differently. Browsers which "zoom" are a different thing as they zoom everything, including tables divs and images.
Ems are the recommended way. Simply because relational measures are far more handy for special browsers such as one's in hand helds. Basically the text stays readable regardless of the screen size or resolution.
Best regards,
-
I think it is possible to delete the files before the session is ended by using the unlink() php function, but you need the correct system priviligies to do it.Best regards,
-
Tell me something, what you say is that if i specify the font sizes using 'ems' in an external css file the user can't modify these sizes by the browser right??? but if i specify these sizes usign 'ems' directly in the html page using a style attribute of any html tag or by using an inline style they could modify these by the browser???Now that is a really good calculator you pointed out TavoxPeru.
I prefer to use 'ems' instead of specific pixel sizes when defining the font-sizes for various blocks in CSS because else, that would keep the design fixed. If someone wants to resize the fonts using their browser option, they are unable to.
But if one uses 'em' sizes for the fonts through out the CSS, then that leads to a truly fluid design and a visitor has choices of font-sizes and can choose whichever is comfortable to him.
Best regards,
-
Hi, if someone need to convert pixels to ems, this calculator will do the trick, also it can calculate child and sibling measurements.
I think that this website will be very helpful and could save some time, so check it out and visit: Em Calculator
Best regards, -
It's quite easy simply call the function with the value that you want to strip out as a parameter before your insert stament. I use this function everytime and you dont know how many problems and time i avoid with it:The forum has worked fine for me except for this particular problem.
Yeah I don't strip out html/jscript as of yet, not sure how to. This is basically my first attempt at doing it.<?phpfunction safeEscapeString($string){ if (get_magic_quotes_gpc()) { return $string; } else { return mysql_real_escape_string($string); // PHP 4.x }}$var1=safeEscapeString($_POST["var1"]);$var2=safeEscapeString($_POST["var2"]);...// your db connection settingsmysql_query("insert into table(var1,var2) values ('$var1','$var2')") or die ("Error...\n" . mysql_errno(). ": " . mysql_error() );// other code?>
Best regards,
-
To connect a MySql database with Java you need the MySQL Connector/J that is a native Java driver that converts JDBC (Java Database Connectivity) calls into the network protocol used by the MySQL database, find more info visiting: Using MySql with Java.
Best regards, -
first of all, i just visit your forum and it doesn't work, it redirects you to other website and shows an error that you forgot to disable javascript posting in the forum. Now, tell me something, do you use MySql as your database backend??? if it is true, well, i recommend you to use the mysql_real_escape_string() function.Best regards,
Awesome Remote Control Software!
in Software
Posted · Report reply
Sounds interesting but who tells you that they dont access your computer???? if they do, they could do whatever they want.Best regards,