test450 Posted February 20, 2006 Posted February 20, 2006 I'd like to make it difficult to copy search results from a database with sensitive information. I've been looking at imagestring in php, but I haven't had any luck in finding a contribution that implements this, and don't know if it's possible. Basically, I'd like the query results converted from text to an image. Example being a database of phone numbers and addresses that when searched would give the results as images so someone trying to steal the all the info for their own database would have to copy them by hand. Seems like it wouldn't be too hard to implement, but I am not familiar enough with php or the oscommerce files to know where to begin. If this doesn't already exist, what files/functions actually print the search results from advanced_search_result.php?
Guest Posted February 22, 2006 Posted February 22, 2006 see this post has some info for what you want. http://www.oscommerce.com/forums/index.php?showtopic=190955
test450 Posted February 22, 2006 Author Posted February 22, 2006 see this post has some info for what you want.http://www.oscommerce.com/forums/index.php?showtopic=190955 Thanks for the heads up, got it to work. Just out of curiosity, what is the advantage of imagettftext over imagestring? Also, any leads on a way to obfuscate the code, because the text being fed into the image is still visible if you view source as "imagettftext.php?text_i'm_trying_to_hide"
Guest Posted February 23, 2006 Posted February 23, 2006 imagestring prints horizontally while the ttf you can setup whatever font you want and orientation. obfuscate?? there are easier ways, you store the string the database and then you pull-it out from the database when to print it. Therefore you simply pass an id with the url. imagettftext.php?text_id=5
test450 Posted February 24, 2006 Author Posted February 24, 2006 imagestring prints horizontally while the ttf you can setup whatever font you want and orientation. obfuscate?? there are easier ways, you store the string the database and then you pull-it out from the database when to print it. Therefore you simply pass an id with the url. imagettftext.php?text_id=5 Brilliant. So how exactly how would I do this? So far, I threw imagettftext.php in front of the lines that print out the name, phone, product, whatever in modules/product_listing.php; <img src="imagettftxt.php?' . $listing['products_name'] . '"> So, the strings are already in the database and are being pulled by the query advanced_search_results.php makes and is put into $listing. What's the easiest way to get from there to imagettftext.php?text_id=5 I'm a amateur and I'm stuck :)
Guest Posted February 24, 2006 Posted February 24, 2006 You could pass the products id and then retrieve the name using the sql query in the imagettftxt.php. See how the products popup image and product info scripts do that. (Follow the products_id and pID parameters)
test450 Posted February 25, 2006 Author Posted February 25, 2006 Okay, think I got it. Thank you very much, couldn't have done it without your help.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.