View Single Post
  (#2) Old
webgovernor is Offline
Banned from DF
webgovernor is on a distinguished road
 
webgovernor's Avatar
 
Posts: 160
Gallery: 0
Comments: 0
Join Date: Oct 2004
Location: Euphoria, all the time...
Zodiac Sign: Capricorn
Rating: Not Rated
Credits: 206
   
Grabbing info via image. - 12-03-04

For my first post I'd like to demonstrate how un-parsed signatures can be used for obtaning IP addresses and other info.

UNPARSED SIGNATURES: Forum sigs that allow links to progs like *.php and *.cgi within the image tag.


Lets move on to the PHP code, first, we'll start out with getting the user info.
$ip = $_SERVER['REMOTE_ADDR']; // declare the IP
$userAgent = $_SERVER['HTTP_USER_AGENT']; // get the user-agent (browser OS, // etc.

then we'll store the info within a text file after creating the input string.

$inputString = "IP: " . $ip . "\n" . "USER AGENT: " . $userAgent . "\n\n";
$fp = fopen( "userInfo/ipList.txt" , "a" ); //opens a file for append
fwrite( $fp, $inputString ); //actualy writes to the file
fclose( $fp ); //closes file.

Now to make the image:
//create the image canvas...
$img_number = imagecreate(300, 80);

Declare colors.

//Create the Color Variables
$white = imagecolorallocate($img_number,255,255,255);
$black = imagecolorallocate($img_number,0,0,0);

Fill the image.
imagefill($img_number,0,0,$black);

Create some strings.
$ipPrint="Your IP is: ";
$line2Print = "I Now have your IP ";
$line3Print = "And your OS/Browser Info.";
$line4Print = "A public service announcement from webgovernor.";

Print the info to the image.
Imagestring($img_number,4,5,5,$ipPrint,$white);
Imagestring($img_number,9,100,5,$ip,$white);
Imagestring($img_number,4,5,35,$line2Print,$white);
Imagestring($img_number,4,5,50,$line3Print,$white);
Imagestring($img_number,2,5,65,$line4Print,$white);

And, finally, we'll display the info.
header("Content-type:image/jpeg"); //output header
imagejpeg($img_number); //print the image to the screen.
?>

To access this image, use the URL to the program, ie:
img src="http://www.yourdomain.com/php/image.php"




There ya have it, that's most of my signature, the rest I don't really care to share.

I've got more fun things like that...

Please share, educating the community can be excellent... heh...

-Web
  
Reply With Quote
 
X vBulletin 3.6.8 Debug Information
  • Page Generation 1.25101 seconds
  • Memory Usage 7,273KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)iprof_zodiac_sign
  • (4)option
  • (1)postbit_legacy
  • (1)postbit_onlinestatus
  • (1)postbit_reputation
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)welcome_headers 

Phrase Groups Available:
  • global
  • photoplog
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./vbseo.php
  • ./includes/functions_vbseo.php
  • ./includes/functions_vbseo_pre.php
  • ./includes/config_vbseo.php
  • ./includes/functions_vbseo_url.php
  • ./includes/functions_vbseo_createurl.php
  • ./includes/functions_vbseo_db.php
  • ./includes/functions_vbseo_vb.php
  • ./includes/functions_vbseo_seo.php
  • ./includes/functions_vbseo_misc.php
  • ./includes/functions_vbseo_crr.php
  • ./includes/functions_vbseo_cache.php
  • ./includes/functions_vbseo_hook.php
  • ./includes/functions_vbseo_startup.php
  • ./includes/config.php
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/vblogetin_config.php
  • ./blogs/plugins/init_startup.php
  • ./blogs/plugins/style_fetch.php
  • ./geek/gars/includes/gars_ignition.php
  • ./blogs/plugins/cache_templates.php
  • ./blogs/plugins/global_start.php
  • ./blogs/backend/functions_blog.php
  • ./blogs/backend/functions_seo.php
  • ./blogs/backend/class_blog.php
  • ./blogs/backend/class_siradrian.php
  • ./blogs/datastore/blogstatistics.php
  • ./blogs/datastore/categories.php
  • ./blogs/datastore/blogcustomfields.php
  • ./blogs/backend/class_permissionCheck.php
  • ./blogs/backend/class_permissionCheckCore.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_misc.php 

Hooks Called:
  • init_startup
  • fetch_postinfo
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • gars_ignition_start
  • gars_ignition_end
  • global_start
  • blog_permissions_start
  • blog_permissions_process
  • blog_permissions_complete
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • fetch_musername
  • reputation_image
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete
  • postbit_display_complete
  • error_fetch
  • showpost_complete

Action Status Required Cached
canViewBlogs true false false
blog true false false
blogPosts false false false
createBlog false false false
modifyBlog false false false
manageEntries false false false