Code Generator
Does anyone knows a code generator for Php ?
Actions to do: specifiy a mysql table and their fields, and build a default
webpage which allows to add,update,delete,search, browse, print the table
data.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Secret Code Generator
The idea is that I can make a password and then encrypt it to make it safe when sending instant messages and emails to colleagues containing sensitive information. The only way I could get this to work was by entering 1 letter per box. I want to be able to type a series of letter or words into one txt area and it be converted as usual.
Flat File Code Generator
I want to know how I can add breaks between table elements (html code) when it's generated from a flat file (input forms) ? Right now the code appears in one continous string, and I'd like it to be neat and tidy (breaking in the code after </td></tr> and </table>) Is this possible? Here's teh code, to show you what I mean : http://stage.jpauldesign.com/mctl/h.../viewevents.php
Name Generator
I’m going to be creating a username generator that gives you a few usernames you could use, based on the one you asked to have but was taken. For example, when you signup for a hotmail account and the e-mail address you specified is already taken, it gives you a few choices to pick from based on DOB, age, etc., or create your own custom one again. The thing I’m going to be making is very similar. Instead stead of generating some names based on your DOB, age, etc. it will just give some names with numbers added on, or whatever the guy I’m making it for wants it to operate. Like I enter in Epsilon and it is taken, it then gives me something like Epsilon2002 (Based on the current year), Epsilon_, Epsilon- and so on.
Password Generator ?
I want the password to generate a 8 character long and the password is A-Z, a-z, 0-9.
Looking For A PHP PIN Number Generator
I am looking for a script that generates PIN Numbers. Is there one available somewhere out there? I don't mind algorithms if they will be easy to implement in PHP.
Site Generator
Has anyone got any scripts that will, after a person registers, it will automatically create a directory for them?? Example: User Registers -> Confiration Page -> User may now go to http://mydomain.com/registeredusername with a default index.hml file Also a File Manager. Does anyone know how to do this or where i can find such a script?
Site Map Generator
i was just wondering would it be possible to create a site map, where by you enter a URL and then it searches through the site and outputs this on a page. I know I've used a package which does this, but interested to see if it can be done using PHP?
Random Generator
This might seem a stupid question but here goes - I wrote a key generator for one of my programs in Visual Basic, so I recieve sales notification via email and then use my program to generate the key and send it via Email. Well after finding out about PHP, and that my host does PHP, I thought it would be quicker and more reliable to generate the keys on the server and send them out again either vai email or from the sales site. So I wrote the generator in PHP and surprisingly it works, or rather it works in a half assed fashion, I can generate keys, but they are not the same as the ones generated by my VB program. And here is my problem, I suspect its becuase I'm using a randomised Seed, and I'm thinking that VB and PHP Randomisers are not compatable. Am I right in my thoughts and if so, is there a way around it? Is the only answer not to use a randomiser? or how do people generate keys from the server when using other languages ie C++ etc?
Thumbnail Generator
Does anyone have a demo to look at for a very simple thumbnail generator for a jpg image? If a user uploads a jpg, and then a thumbnail is made of it.
Quiz Generator...
I have been doing through the web to search for a test/exam quiz generator that generate quiz, test and provide statistics. Most of them are commerical. Are there open source program for it in php?
Standalone Sig Generator
I currently have my sig generator running, the problme Im facing is that it outputs like this http://mysite.com/image.php?sigimage.png I need to have it out put like this -> http://mysite.com/image.png?sigimage.png or something like it because a lot of sites do not allow image.php. Code:
PHP Screenshot Generator
Does anyone know of any real-time screenshot generator? Where you can give the PHP file a URL and it will convert that URL page into a JPEG image with GD? I have had a look around and only found a few but none seemed to do this job. Anyone?
Table Generator
I have this way of getting a webpage to include a table from a comma separated file. Works well for purpose I have used up to now but wish to extend it to generate a table with a top row of cells of type th. So two questions about this: 1. What exactly should the code be to enable this and 2. How should the csv file be formatted (if different from normal comma...
Password Generator- Unique?
I have a script that is supposed to generate unique passwords. Trouble is its producing passwords that already exist in the 'personaldetails' table. i don't think I'm the lucky type that wins the lottery everyday so it its not by chance - there is an error somewhere. (the userid is primary key and is autoincrement, I know thats not a standard way of doing it but that isn't causing this error) The script is: if ("SUBMIT"==$generate){ $String = "This is the text which will be encrypted so that we may create random and secure passwords!"; $Length = 8; // Change this value to indicate how long your passwords should be. 32 character limit. $String = md5($String); $StringLength = strlen($String); srand ((double) microtime() * 1000000); $Begin = rand(0,($StringLength-$Length-1)); // Pick an arbitrary starting point. $password = substr($String, $Begin, $Length); print ("Your recommended password is:<P><BIG>$password</BIG> "); // Add the password to the database. $sql = "INSERT INTO personaldetails SET " . "firstname='$firstname', " . "surname='$surname'," . "password='$password'," . "teacherstatus='$teacherstatus'"; if (mysql_query($sql)) { echo("<P>Your password has been added to the database.</P>"); } else { echo("<P>Error adding password to database: " . mysql_error() . "</P>"); } $Query5="SELECT userid FROM personaldetails WHERE password='$password'"; $result5=mysql_query($Query5) or die ("Can not execute query:" . mysql_error()); print("Your userid is " . mysql_result($result5,0) . ". This has also been added to the database. "); } I don't understand why its not generating unique passwords. As, a consequence I'm bringing back the userid for the password that was already in the table, I end up with 2 people sharing the same password and and the generator reports they have the same userid ( when I look in the table the newest row has been added and has a userid which is different to the userid of the other person in the table who has the first copy of the password. My query to bring back the userid is bringing back the userid of the first row it comes to that has the 'unique' password entry, unfortunately the password is not unique and so I get the wrong persons userid? - can you spot what is wrong with the generator?
Random Number Generator
<?php function get_random_number_between($start, $end) { srand((float)microtime()*1000000); $random_number=rand($start,$end); return $random_number; }; echo get_random_number_between(2, 4); ?> Could anyone suggest how to modify this code to output a float between 2 and 4 with 2 decimal places?
Password Generator- Unique?
I have a script that is supposed to generate unique passwords. Trouble is its producing passwords that already exist in the 'personaldetails' table. i don't think I'm the lucky type that wins the lottery everyday so it its not by chance - there is an error somewhere. (the userid is primary key and is autoincrement, I know thats not a standard way of doing it but that isn't causing this error) The script is: if ("SUBMIT"==$generate){ $String = "This is the text which will be encrypted so that we may create random and secure passwords!"; $Length = 8; // Change this value to indicate how long your passwords should be. 32 character limit. $String = md5($String); $StringLength = strlen($String); srand ((double) microtime() * 1000000); $Begin = rand(0,($StringLength-$Length-1)); // Pick an arbitrary starting point. $password = substr($String, $Begin, $Length); print ("Your recommended password isP><BIG>$password</BIG> "); // Add the password to the database. $sql = "INSERT INTO personaldetails SET " . "firstname='$firstname', " . "surname='$surname'," . "password='$password'," . "teacherstatus='$teacherstatus'"; if (mysql_query($sql)) { echo("<P>Your password has been added to the database.</P>"); } else { echo("<P>Error adding password to database: " . mysql_error() . "</P>"); } $Query5="SELECT userid FROM personaldetails WHERE password='$password'"; $result5=mysql_query($Query5) or die ("Can not execute query:" . mysql_error()); print("Your userid is " . mysql_result($result5,0) . ". This has also been added to the database. "); } I don't understand why its not generating unique passwords. As, a consequence I'm bringing back the userid for the password that was already in the table, I end up with 2 people sharing the same password and and the generator reports they have the same userid ( when I look in the table the newest row has been added and has a userid which is different to the userid of the other person in the table who has the first copy of the password. My query to bring back the userid is bringing back the userid of the first row it comes to that has the 'unique' password entry, unfortunately the password is not unique and so I get the wrong persons userid? - can you spot what is wrong with the generator?
Form Generator Or Class / OSX
i am sure we all know this Problem, u build a website and want to implement a CMS, so that the content can be updated easily. So u spend half a day building Form Sets for Update insert delete etc.. Does anyone here know of a good form generator that will build this forms automaticly? Best would be a Class or something but a desktop version that runs on OSX would be great too.
PHP File Map Generator/editor
Is there some software that can map the file tree (mainly the file includes within the PHP scripts) and create a tree to show where these files are included, and from which files. Rather like UML for c and c++ kind of function?
Database Or File For Name Generator ?
I am making a random name generator, it will pick two or three words from a list and turn them into a name. It seems a database needs to work with name/value pairs, so am I right in thinking for a simple list, seperated by line breaks, a file is the most sensible choice ? If so, what happens if someone else tries to write to the file whilst I am working with it ?
Random Signature Generator
I'm trying to find a script for use on vB that will randomly generate a banner image (from a few images that I select in advance) when it loads in my signature. I've seen them at work, but can't seem to find them on, say, yahoo, or google.
Class Or Function For A Key Generator?
I need to be able to produce a string consisting of uppercase letters and numbers. I would also like it to produce e.g. a string of 6 characters all the time. A given number must allways result in same string such as "AE4YX8". Would also be nice if I could go from the string to the original number as well. Anyone with links to sites with example on how to do this?
Wanted: PHP Site Map Generator!
Having spent my free time over the last few months converting several hundred pages of mainly static (s)html into eight pages of data driven php loveliness and a whopping MySQL database I'm faced with a bit of a dilemma. Will search engines be able to crawl all the index.php?query paths so people can find stuff? I'm currently at the top of the heap on Google as my site has been around for years and is pretty niche and I don't want to lose that advantage. Which leads to the main part of the question; is there a 'site map' generator which will vreate a single crawlable HTM page with all my possible pages on iot which I can then link to from my home page which will enable the search spiders to do their thing? Or am I left with the unenviable task of having to put response/redirects on all the old pages pointing to the equivalent dynamic pages?
Random Pixel Generator
Im trying to create a program that generates random pixels from a set picture.. i know how to write a random number generator its just figuring out how to take that one step further and getting it to grab pixels from a picture and show them one by one when somebody clicks generate button. there needs to be 1,000,000 pixels in total. Raar my head hurts trying to think of a way to do it!
Auto Generator Codes.
I know this is very easy. what i want is a six codes generator. Let say i have a button when i press this button it will generate six digit codes. for example i have this code 543545. now i wanted also when i use this code it will tell me it's the valid codes. maybe you have the idea, just want to know the functions that i should use for this.
Random Password Generator
how can I make a password generator using php and javacript so that whenever a button is clicked it generates a random password in a text box. I've already done the password generator code. When I click on the button it generates a password but if I click it again it won't generate a different code. So is there a way to have it generate a different password each time? Right now when I click on the button it will call the javascript function to change the text in the input box to echo rand_pass(); like so <input id="password" name="password" type="text" size="71" maxlength="128" style="margin-top:2px;" tabindex="26"/> <input name="rand_pass" id="rand_pass" type="button" value="generate" onClick="generate( 'password', '<?php echo rand_pass(); ?>' );" class="Buttons">
Rapidshare Premium Link Generator :
I got a script from one of my friend.It is used for generating rapidshare premium links like : http://rapidfool.com/ But its not working !Code:
Six-random No Generator, But Not In Good Ordering
how to put a randomly generate in to an array, so that I can sort them with sort function? result is: B1 38 + 41 + 34 + 30 + 27 + 22 B2 34 + 22 + 10 + 35 + 18 + 11 B3 34 + 2 + 7 + 34 + 37 + 1 B4 30 + 34 + 7 + 2 + 27 + 25 //$holdno = array ($rno); //sort ($holdno); //echo sort($holdno); //reset ($holdno); I follow from php.net, they are wrong. I need something like: $holdno(1)=no(random draw1) $holdno(2)=no(random draw2) $holdno[sixno] = $rno; echo $holdno[sixno]; I tried this but I can't sort them. .... ....etc its very difficult, when a nos is drawn, it is not put back to pool, and continue to draw a nos. leave question 2 for the time being. PHP Code:
Php - Mysql Form Field Generator
does anyone know of a simple function/class that will take config options: table name and the database connection stuff(or whatever) It will then print out appropriate form fields to allow editing of a row? The reason being is that in the admin section of a website I am building we are constantly adding columns to a table...It is used for keeping config options of the site. We do not wanna update the form each time we add a column.
Can My Server Take The Load Of This Thumbnail Generator?
My server: Shared VPS Centos 4 Equal share CPU 1GB Burst RAM 256MB RAM My question: I have a .php file generate thumbnails on the fly. I have a moderate amount of traffic. Sometimes the gallery(s) shown can list up to 20 or so images, with fairly large thumbnails. Am I causing uneccessary server load by not just making my own thumbnails and having all these galleries generated on the fly?
Sequential Alphanumeric String Generator
I was wondering how I would generate a set of Alphanumeric strings with PHP. So the script would run and output something like: a b c d .. x y z aa ab ac ad ...and so on. Alpha would be good, although Alphanumeric would be much better. Also the option to define how many characters long the string can be would be a plus.
Permissions Problem With Sitemap Generator
I have bought a standalone xml sitemap generator online.I am new to webhosting and a newbie in all these stuff.I ahve followed all the instructions by the software provider, but still cant get my sitemap ready. The error showing is "config file is not writable: /home/mydomain/public_html/generator/config.inc.php Datastorage folder is not writable: /home/mydomain/public_html/generator/data/" however i have changes the permission of these files in my server to 0666 and 0777 as instructed. But when I try to save my configuration it shows the above mentioned error.
Temp Table - Random Number Generator
I am developing a data entry program where information is entered into a form, then submitted to a databse. I need to be able to set up a temporary table which houses this data and then when all transactions are complete, the data in the temporary table is entered into my permanent table - then the temp table is deleted. (I won't get into the details as to why this has to be done this way) Setting up the table is simple, however I ran into a bit of a wall when it comes to having several people entering data at the same time. If they were all to use the same temp table, then when one user finishes (and the table is auto-dropped) then other users data entry would be killed. SOLUTION: Use a random generator to name the temp tables, that way I can have several data entry users without running the risk of losing data when the temp tables are dropped. PROBLEM I don't know the best method to make a random number generator Can anyone help, or suggest a simple, yet effective generator?
PEAR DB_DataObject Auto-generator Multiple Databases
I'm using the DB_DataObject script createTables.php to auto-generate the necessary database schema on two databases. Using the .ini approach (not the in-line PHP approach) to configure DB_DataObject in my script. Everything is by the book, but I'm having a big problem: Here's my main.ini file: [DB_DataObject] database_one = mysql://user:password@localhost/one database_two = mysql://user:password@localhost/one schema_location = /home/user/classes/dataobjects class_location = /home/user/classes/dataobjects require_prefix = /home/user/classes/dataobjects class_prefix = DataObject_ And here's my database connect file: <?php // separate classes for each database class DataObject_one extends DB_DataObject { var $_database = 'one' } class DataObject_two extends DB_DataObject { var $_database = 'two' } $config = parse_ini_file('/home/user/classes/main.ini', TRUE); foreach($config as $class=>$value) { $options = &PEAR::getStaticProperty($class,'options'); $options = $value; } $DB = DataObject_one::factory("tableName"); // etc... ?> The problem is that the auto-generator createTables.php copies everything into one directory, regardless of the number of databases you enter in your .ini file, which means, as is the case for me in this example, if you have two tables with the same name on different databases, it'll keep overwriting the same file, and the resulting class is the LAST one you enter in your .ini file. So my question is this: is there a way to specify different subdirectories for different databases in your initial configuration file? If not, is there no other solution than giving every table a unique name across an entire MySQL server if you don't want to do any coding?
Old Code Vs New Code - Language Syntax Change?
I've recently begun programming PHP again and have found my old code doesn't work anymore. It's been a few years since my code was written, and simple functions don't seem to be working. I've done a bit of research into the syntax again and found the following; I used to use a function as such; if ($REQUEST_METHOD=="POST") { Now I've seen alot of the syntax is if ($_SERVER($REQUEST_METHOD=="POST")) { And referencing variables from the form is as such; $_POST['variable'] Where previously I could reference them in the simple form; $variable Has there been a language syntax change that would cause my old code to be obsolete? Is there a configuration line that could be changed to allow this old code to work?
BB Code - Escape A Bracket In BB Code?
Is there a way to escape a "bracket" in BB code? The beginning of a bbcode post I made starts with something in brackets [like this]. This causes a strange thing to happen to the remainder of my post. Removing the brackets makes my post normal. That shows me that I need to escape the brackets. However, a simple backslash does not seem to do the trick i.e. this [wont work] I am not the administrator of the bb forum, just a poster. So I need to know what to do on my end (as opposed to an adiministrator's power to reconfigure, etc.
Code To Display My Code
I am taking a class in PHP and thought that it would be nice to display the PHP code that generated my pages when the user clicked a link (or submit button). I have seen page that will display the underlying HTML on the page and it would be a nice touch...
BB Code
i am making my own forums and i've got everything working pretty good except the bb code. i can get the easy ones like bold and emails but ones like 'url=index.php'Test'/url' (' = [ and ]) confuse me. i could get it if it was just url= or just plain url but when it can be either one i can't get it to work right.
How To Add A Pop-up Code To Php
cecho"<script>" . "function openpopup()" { . "var popurl="clip.html"" . "winpops=windows.open(popurl,"",width=640,height=480,toolbar,directories,scrollba rs," } . "</script>"Hi, ÿ. "</script>"Hi, s.open(popurl,"",width=640,height=480,toolbar,directories,scrollba rs," in.php?op=modules">"._ADDAHOME."</a> ]</center>";
GPS, Zip Code DB
I am searching for a database that I can write a PHP application against. I am not looking for bulky packages, or anything fancy or maps, ... just some raw SQL data I can mix & match from tables, ... stuff like Zip codes, Latitude and Longitude, and any other basic address & coordinate info. I can cross reference and tie...
SSL Php Code
I am using linux, php and trying to do some ssl code. I want to send some identifier that connects my database to the client browser. I was looking into a secure cookie. I only want the page accessed over a SSL connection. Whats the best way to insure the clinet browser can only see my page if they are ssl connected to it? In adding a 1 to the end of my send cookie code, it sends the cookie regardless of if they are ssl connected or not.
Zip Code
I have a database of zipcodes with latitude and longitude. I also have the method of calculating the distance between two zipcodes. What I want to know is if there is an efficient algorithm for obtaining the zip codes within a specified distance of the first zipcode without having to retrieve and calculate for every record in the database.
Zip Code From IP
I found this on the internet in a process of grabbing weather from weather.com and it uses the IP to trace back the closest zip code. It looks up the whois info in arin.net and once, worked correctly. I was wondering if anyone knew why it no longer grabs the correct zip code. I don't want the weather anymore but rather just the zipcode. Code:
Code?
This is straight out of a book I'm reading to learn PHP. I'm thinking maybe I set either apache or PHP up incorrectly on my computer. Simpler PHP's snippets work fine so I just don't know. Could someone look this over and see if I have a problem? <?php function printColor($text, $color="black", &$count=NULL) { //print the text with style print("<span style="color: $color">" . "$text</span>"); //if given a count, increment it if(isset($count)) { $count++; } } //call with one argument printColor("This is black text"); print("<br> "); //override default color printColor("This is blue text", "blue"); print("<br> "); //pass in count reference $c = 0; printColor("This is red text", "red", $c); print("<br> "); printColor("This is green text", "green", $c); print("<br> "); print("Count: $c<br>"); ?>
PHP Bug (or My Bad Code)?
Consider this code: <? $mask_n = (pow(2,32) - (pow(2,32-24)-1)); printf("%x ", $mask_n); ?> On PHP 4.1.2 it prints: ffffff00 On PHP 4.3.10 is prints: ffffff01 Both versions of PHP are the standard Debian packaged versions (4.1.2 from Woody, 4.3.10 from Sarge) tecra# php -v PHP 4.3.10-9 (cli) (built: Mar 6 2005 17:45:14) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies admin# php -v 4.1.2 Results are (predictably) the same under both the CLI version and under the Apache module. Is this a bug in PHP, or is there something broken in my code?
|