GSM Shop GSM Shop
GSM-Forum  

Welcome to the GSM-Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features.
Only registered members may post questions, contact other members or search our database of over 8 million posts.

Registration is fast, simple and absolutely free so please - Click to REGISTER!

If you have any problems with the registration process or your account login, please contact contact us .

Go Back   GSM-Forum > Other Gsm/Mobile Related Forums > GSM Programming & Reverse Engineering


GSM Programming & Reverse Engineering Here you can post all Kind of GSM Programming and Reverse Engineering tools and Secrets.

Reply
 
LinkBack Thread Tools Display Modes
Old 10-02-2011, 12:25   #1 (permalink)
Freak Poster
 
Join Date: Jun 2009
Location: !!!! AWAY FROM BOARD, STUDY !!
Posts: 363
Member: 1055354
Status: Offline
Thanks Meter: 252
PHP Code-128 IMEI barcode generator (2006)


Hi,

i'm currently due to lack of time not in this board, just found a source code from obsolete company site that was used for generating IMEI barcodes for service purposes, as we had self-written service logging system.

Generated barcode is Code-128, same as on IMEI labels of old DCT4 phones, and should be readable by just about and 5 EUR barcode scanner even from the 80s.

It is not directly related to GSM, but maybe useful if you plan to write a service logging system for organizing your service jobs.

Demo:
http://bb5.at/barcode-imei.php?imei=350604107178019

Source:
[PHP] CODE 128 BARCODE GENERATOR - Pastebin.com

Code:
<?php
	// "NOKIA DCT4" C128 BARCODE ENCODER
	// (C) UNLOCKER.AT 2006-2010

	// USE: ./barcode-imei.php?imei=350604107178019
	// (replace sample IMEI by your IMEI)
	
	$codes = array(
	"11011001100", // 0
	"11001101100", // 1
	"11001100110", // 2
	"10010011000", // 3
	"10010001100", // 4
	"10001001100", // 5
	"10011001000", // 6
	"10011000100", // 7
	"10001100100", // 8
	"11001001000", // 9
	"11001000100", // 10
	"11000100100", // 11
	"10110011100", // 12
	"10011011100", // 13
	"10011001110", // 14
	"10111001100", // 15
	"10011101100", // 16
	"10011100110", // 17
	"11001110010", // 18
	"11001011100", // 19
	"11001001110", // 20
	"11011100100", // 21
	"11001110100", // 22
	"11101101110", // 23
	"11101001100", // 24
	"11100101100", // 25
	"11100100110", // 26
	"11101100100", // 27
	"11100110100", // 28
	"11100110010", // 29
	"11011011000", // 30
	"11011000110", // 31
	"11000110110", // 32
	"10100011000", // 33
	"10001011000", // 34
	"10001000110", // 35
	"10110001000", // 36
	"10001101000", // 37
	"10001100010", // 38
	"11010001000", // 39
	"11000101000", // 40
	"11000100010", // 41
	"10110111000", // 42
	"10110001110", // 43
	"10001101110", // 44
	"10111011000", // 45
	"10111000110", // 46
	"10001110110", // 47
	"11101110110", // 48
	"11010001110", // 49
	"11000101110", // 50
	"11011101000", // 51
	"11011100010", // 52
	"11011101110", // 53
	"11101011000", // 54
	"11101000110", // 55
	"11100010110", // 56
	"11101101000", // 57
	"11101100010", // 58
	"11100011010", // 59
	"11101111010", // 60
	"11001000010", // 61
	"11110001010", // 62
	"10100110000", // 63
	"10100001100", // 64
	"10010110000", // 65
	"10010000110", // 66
	"10000101100", // 67
	"10000100110", // 68
	"10110010000", // 69
	"10110000100", // 70
	"10011010000", // 71
	"10011000010", // 72
	"10000110100", // 73
	"10000110010", // 74
	"11000010010", // 75
	"11001010000", // 76
	"11110111010", // 77
	"11000010100", // 78
	"10001111010", // 79
	"10100111100", // 80
	"10010111100", // 81
	"10010011110", // 82
	"10111100100", // 83
	"10011110100", // 84
	"10011110010", // 85
	"11110100100", // 86
	"11110010100", // 87
	"11110010010", // 88
	"11011011110", // 89
	"11011110110", // 90
	"11110110110", // 91
	"10101111000", // 92
	"10100011110", // 93
	"10001011110", // 94
	"10111101000", // 95
	"10111100010", // 96
	"11110101000", // 97
	"11110100010", // 98
	"10111011110", // 99
	"10111101110", // 100
	"11101011110", // 101
	"11110101110", // 102
	"11010000100", // 103
	"11010010000", // 104
	"11010011100", // 105
	"11000111010", // 106
	);
	if (isset($_GET["imei"]) && strlen($_GET["imei"]) == 15  && is_numeric($_GET["imei"]))
			$imei = $_GET["imei"];
	else
			die("Error");
	
	$data = array();
	$data[0] = ($imei{0} + 16);
	$data[1] = "99";
	for ($x = 0; $x < 7; $x++)
			$data[$x + 2] = $imei[($x * 2) + 1] . $imei[($x * 2) + 2];
	$checksum = 104;
	for ($x = 0; $x < 9; $x++)
	{
			$digitsum = ($data[$x]) * ($x + 1);
			$checksum = $checksum + $digitsum;
	}
	$checksum = ($checksum % 103);
	$barcodeimage = @ImageCreate(150, 50) or die("GD error");
	imageantialias($barcodeimage, 1);
	$white = ImageColorAllocate($barcodeimage, 255, 255, 255);
	$black = ImageColorAllocate($barcodeimage, 0, 0, 0);
	$encoded = $codes[104];
	for ($x = 0; $x < 9; $x++)
	{
			$temp = ltrim($data[$x], "0");
			if (!$temp)
					$temp = "0";
			$encoded = $encoded . $codes[$temp];
	}
	$encoded = $encoded . $codes[$checksum] . $codes[106] . "11";
	for ($x = 0; $x < strlen($encoded); $x++)
	{
			if ($encoded{$x})
					imageline($barcodeimage, $x, 5, $x, 20, $black);
	}
	
	// TEXT generation using GDF font
	// 5x7-x86.gdf for little-endian machine (Intel x86)
	// 5x7-ppc.gdf for big-endian machine (PowerPC G4)
	$font = imageloadfont('5x7-x86.gdf');
	//$font = imageloadfont('5x7-ppc.gdf');
	imagestring($barcodeimage, $font, 0, 20, " ** " . $imei . " **", $black);

	// TEXT generation using Truetype font
	//Example if you like TTF TXT more than 5x7 fonts :)
	//imagettftext($barcodeimage,10,0,0,33,$black,"./ocrb10.ttf",$imei);
	
	// If you can't see anything or broken IMG, turn header off to see
	header("Content-type: image/gif");
	imagegif($barcodeimage);
	ImageDestroy($barcodeimage);
?>

File 5x7 font GDF (PPC version does not exist anymore,in case you want to use on PPC machine, flip the byte order of the x86 file or just use Truetype, internal GD font etc)
http://bb5.at/5x7-x86.gdf

Program requires nothing more than GD library and therefore runs on just about ANY web server. No object orientation means, it's easy to understand.
  Reply With Quote
The Following 3 Users Say Thank You to sergeymkl For This Useful Post:
Show/Hide list of the thanked
Old 10-02-2011, 22:16   #2 (permalink)
Cheater -Don't Deal with him-
 
golden_gsm's Avatar
 
Join Date: Aug 2002
Posts: 560
Member: 14481
Status: Offline
Thanks Meter: 94
Make an EXE from this PHP.Its very usefull to have it.
  Reply With Quote
Old 10-03-2011, 16:31   #3 (permalink)
Freak Poster
 
Join Date: Mar 2009
Posts: 234
Member: 984268
Status: Offline
Thanks Meter: 150
Quote:
Originally Posted by golden_gsm View Post
Make an EXE from this PHP.Its very usefull to have it.

in 1 min http://*****.com/a8a525u3s511/Barcode.zip

+ Save image...



lol
  Reply With Quote
Old 10-03-2011, 16:42   #4 (permalink)
Freak Poster
 
Join Date: Mar 2009
Posts: 234
Member: 984268
Status: Offline
Thanks Meter: 150
new link : http://01.nl/xscx0

sorry upp1t is replaced for *****
  Reply With Quote
The Following User Says Thank You to mustipusti For This Useful Post:
Old 10-16-2011, 22:08   #5 (permalink)
No Life Poster
 
oOXTCOo's Avatar
 
Join Date: Dec 2000
Location: J.A.U - Just Another Unlocker
Age: 43
Posts: 3,498
Member: 2878
Status: Offline
Thanks Meter: 9,123
do you converted php code to delphi or you implemented the php with php interpreter or just coded own?

EDIT: ok.. you use php script on server and just call it from delphi via sockets

Last edited by oOXTCOo; 10-16-2011 at 22:14.
  Reply With Quote
Old 10-20-2011, 19:18   #6 (permalink)
Junior Member
 
Join Date: Oct 2011
Location: united states
Posts: 1
Member: 1671772
Status: Offline
Sonork: sonork id
Thanks Meter: 0
Hello,

I think Barcode is a PHP barcode generation script. Features: error checking has been added, code 39 support, font control, Code 128-A, Code 128-B, code 128-C, png and jpg image generation, size choices, and more. Code: PHP 4.0

business development
  Reply With Quote
Old 10-20-2011, 21:26   #7 (permalink)
Freak Poster
 
Join Date: Mar 2009
Posts: 234
Member: 984268
Status: Offline
Thanks Meter: 150
Quote:
Originally Posted by oOXTCOo View Post
do you converted php code to delphi or you implemented the php with php interpreter or just coded own?

EDIT: ok.. you use php script on server and just call it from delphi via sockets

yep :P the easy way :P
  Reply With Quote
Old 10-27-2011, 05:20   #8 (permalink)
No Life Poster
 
mughalG's Avatar
 
Join Date: Jul 2006
Location: U-A-E Dubai---->Pak
Posts: 2,906
Member: 315789
Status: Offline
Thanks Meter: 3,428
There is another way to make php script into exe. See exeoutput for details... BR
  Reply With Quote
Old 12-10-2012, 17:40   #9 (permalink)
Junior Member
 
Join Date: Dec 2012
Posts: 7
Member: 1850942
Status: Offline
Thanks Meter: 0
i would like to know the card unlock code for my huawei imei no 863791010336709
Found modem : E173z-1A
Model : Huawei E1731
IMEI : 863791010336709
Serial NR. : D6G4CA9250829089
Firmware : 21.157.13.00.910
Compile date / time : Jan 18 2012 15:30:00
Hardware ver. : CH2E303SM
Dashboard version : graham_inggs_custom_iso
Chipset : HiSilicon
Voice feature : enabled
SIM Lock status : Locked (CardLock)
Wrong codes entered : 8 (unlock attempts left : 2)
please send the unlock code to this mail [email protected]
  Reply With Quote
Old 01-18-2013, 03:37   #10 (permalink)
Junior Member
 
Join Date: Jan 2013
Posts: 1
Member: 1870158
Status: Offline
Sonork: 234
Thanks Meter: 0
May be this passage called guide/tutorial for generating Code 128 barcodes in Java is helpful. I found this on Google when tying your question in.
  Reply With Quote
Old 01-22-2013, 04:53   #11 (permalink)
Junior Member
 
Join Date: Jan 2013
Posts: 1
Member: 1872219
Status: Offline
Sonork: 23256563436
Thanks Meter: 0
I like this a PHP barcode generation, cause I can choose any barcode type, including code 128.
  Reply With Quote
Old 04-09-2013, 10:37   #12 (permalink)
Junior Member
 
Join Date: Apr 2013
Posts: 1
Member: 1913511
Status: Offline
Thanks Meter: 0
It is possible to create code128 by inserting the code 128 generator in to the web page in php.
  Reply With Quote
Old 04-09-2013, 12:20   #13 (permalink)
Freak Poster
 
Join Date: Oct 2005
Posts: 105
Member: 194595
Status: Offline
Thanks Meter: 5
That code 128 generator is made specifically for ASP.NET webpages, so it wouldn't natively work with PHP. You can however try and use the DLL with a PHP application if your server is on Windows. There's some information here on how to connect .NET libraries to PHP:

asp.net - How to create C# DLL to use in PHP - Stack Overflow

This is the php.net reference page on the DOTNET class:

PHP: DOTNET - Manual
  Reply With Quote
Old 04-22-2013, 03:41   #14 (permalink)
Junior Member
 
Join Date: Apr 2013
Posts: 1
Member: 1921903
Status: Offline
Thanks Meter: 0
I have ever used ASP.NET Code128 barcode generator and .NET WinForms Code128 barcode generator, I don't know whether it is suitable for PHP, you may have a try.
  Reply With Quote
Old 06-07-2013, 11:01   #15 (permalink)
Junior Member
 
Join Date: Jun 2013
Posts: 7
Member: 1955164
Status: Offline
Sonork: asdwe
Thanks Meter: 1
Quote:
Originally Posted by yy1023 View Post
I have ever used ASP.NET Code128 barcode generator and.NET WinForms Code128 barcode generator, I don't know whether it is suitable for PHP, you may have a try.
These generators are not suitable for PHP!
  Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: Forgot my 6110 user lock code!! GByte9 Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 4 02-26-2016 14:52
PIN1/PIN2 CODE Jon Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 1 12-26-2012 04:40
what prog changes imei on 6110 and how do i do it? Ravetrancer Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 3 07-31-2012 20:09
Nokia 51xx/61xx imei changer ver. 1.10?????? Ravetrancer Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 8 04-06-2012 16:22
6110 imei changer !!!!!! Ravetrancer Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 5 11-21-2011 01:44

 



All times are GMT +1. The time now is 02:07.



Powered by Searchlight © 2024 Axivo Inc.
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
- GSM Hosting Ltd. - 1999-2023 -
Page generated in 0.30512 seconds with 10 queries

SEO by vBSEO