1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need sql->html converter

Discussion in 'Black Hat SEO' started by maxywaxy, Jan 8, 2009.

  1. maxywaxy

    maxywaxy Registered Member

    Joined:
    Jan 4, 2009
    Messages:
    62
    Likes Received:
    9
    I'm looking for a tool/script that creates .html pages for mysql database rows.

    So like when you have a database called Food:

    england_food is a table which includes:
    foodname: foodprice:
    1 patatoes 5euro
    2 tomates 10 euro
    3 bananas 15 euro

    The tool or script should create 3 pages automatically with the 3 rows information on each page.

    So when I've got like a list of most important citys and countrys i can put those lists in Mysql and the tool/script will create a page for each country with the city for me. And ofcourse this will make unique content this way. Sometimes people have "20.000 pages that I have to upload" I think theyre made this way.

    The one that posts the best information gets 2 PR7 backlinks from me if he wants to.

    Greetings,

    Maxywaxy
     
  2. Tom__

    Tom__ Junior Member

    Joined:
    Nov 9, 2008
    Messages:
    134
    Likes Received:
    300
    You will need to use PHP/PERL/... something that can interact with the mysql server to output a html page.
     
  3. Arthas

    Arthas BANNED BANNED

    Joined:
    Jan 5, 2009
    Messages:
    637
    Likes Received:
    322
    i posted code here but now its gone for some reason.
     
  4. maxywaxy

    maxywaxy Registered Member

    Joined:
    Jan 4, 2009
    Messages:
    62
    Likes Received:
    9
    ?? strange

    Anybody that can give me information?
     
  5. Sweetfunny

    Sweetfunny Jr. VIP Jr. VIP Premium Member

    Joined:
    Jul 13, 2008
    Messages:
    1,747
    Likes Received:
    5,039
    Location:
    ScrapeBox v2.0
    Home Page:
    Tom did, you need to use PHP that makes a DB connection with your user/pass then select/echo the info from your tables to the page.
     
  6. Arthas

    Arthas BANNED BANNED

    Joined:
    Jan 5, 2009
    Messages:
    637
    Likes Received:
    322
    i already wrote him a complete script but when i asked what his high PR domains are he never responded.
     
  7. stupiddumbass

    stupiddumbass BANNED BANNED

    Joined:
    Oct 11, 2008
    Messages:
    132
    Likes Received:
    191
    is there such thing a html to php? I havnt heard of the html for sql. I was trying to do the same thing somewhat. But php sucks. so difficult to create.
     
  8. maxywaxy

    maxywaxy Registered Member

    Joined:
    Jan 4, 2009
    Messages:
    62
    Likes Received:
    9
    I haven't had any code yet. I've added you to MSn when you sent me a PM where you said you would give me the code.

    A simple php echo won't work just read the first post carefully.

    And PHP/HTML its just the same doesnt matter which format cuz i can use php in my html pages on my host.

    I need something which CREATES the html/php pages so i dont have to make them al one by one.
     
  9. neta1o

    neta1o Regular Member

    Joined:
    Sep 29, 2008
    Messages:
    388
    Likes Received:
    318
    Home Page:
    Can be done with php

    Here is the basic idea of each page

    Page 1
    //connect to db
    //run query on db - where id = 1
    //display's record 1

    Page 2
    //connect to db
    //run query on db - where id = 2
    //display's record 2

    etc...

    So basically all of the pages will be identical the only thing that needs to be generated is the id of the field you want to display, which if they are in order incrementally shouldn't be an issue.

    As for the physical page generation, maybe someone else can contribute a page creation script from perl or something.
     
  10. Sweetfunny

    Sweetfunny Jr. VIP Jr. VIP Premium Member

    Joined:
    Jul 13, 2008
    Messages:
    1,747
    Likes Received:
    5,039
    Location:
    ScrapeBox v2.0
    Home Page:
    Nobody said anything about a simple echo working, of course it won't you need to select the data from the DB first.

    PHP/HTML isn't the same at all, and no you can't run php in your .html page.

    Ok, you seem to have it all figured out then.
     
  11. maxywaxy

    maxywaxy Registered Member

    Joined:
    Jan 4, 2009
    Messages:
    62
    Likes Received:
    9
    Thanks for your 'by-the-hand' reply sweet funny.
    Yes I can use PHP in html pages, when I say so i'm not talking bs. Search for it on google or ask it nicely if youre interested.

    Thx for the other replys.

    Yes I know that I should run a query but is there no public script or tool that will create those 10.000 html/php query pages for me cuz i dont want to change the query id 10.000 times

     
  12. neta1o

    neta1o Regular Member

    Joined:
    Sep 29, 2008
    Messages:
    388
    Likes Received:
    318
    Home Page:
    ^I'd be interested in how to put php in an html page.

    If I save the page as whatever.html. Even if I put the <?php ?> in there it doesn't parse the php. I guess one could iframe a php page on an html page. I'm sure we'd all be interested in the info.

    As for your page generator maybe look in the direction of article spinners (but instead of an article see if you can use html code etc...)
     
  13. Sweetfunny

    Sweetfunny Jr. VIP Jr. VIP Premium Member

    Joined:
    Jul 13, 2008
    Messages:
    1,747
    Likes Received:
    5,039
    Location:
    ScrapeBox v2.0
    Home Page:
    As i said, .php wont "just" run in .html pages.

    Yes you can force it to do it using AddHandler in .htaccess but some hosts don't enable it. The simplest solution is just write your php using the .php extension like normal, then mod_rewrite it to .html if it's so important to use that extension.
     
  14. Arthas

    Arthas BANNED BANNED

    Joined:
    Jan 5, 2009
    Messages:
    637
    Likes Received:
    322
    here you go. you will have to set user write permissions for the folder where the script is executed.
    PHP:
    <?php
    $sqlserver 
    "";
    $sqluser "";
    $sqlpassword "";
    $sqldatabase "";
    $dblink mysql_connect($sqlserver$sqluser$sqlpassword);
    mysql_select_db($sqldatabase) or die(mysql_error() );
      
    $tabledata mysql_query('SELECT * FROM england_food');
      
    $num mysql_numrows($tabledata);
    $i=0;
    while (
    $i $num) {
      
    $foodname mysql_result($tabledata,$i,"foodname");
      
    $foodprice mysql_result($tabledata,$i,"foodprice");
      
    $towrite "$i - $foodname - $foodprice";
      
    $filename "$foodname-$i.php";
      if (!
    $handle fopen($filename"w") ) {
        echo 
    "Cannot open file ($filename)";
      }
      if (@
    fwrite($handle$towrite) === FALSE) {
        echo 
    "Cannot write to file ($filename)";
      } else {
        echo 
    "$filename has been created";
      }
      
    $i++;
      
    fclose($handle);
    }
      
    ?>
     
  15. Tom__

    Tom__ Junior Member

    Joined:
    Nov 9, 2008
    Messages:
    134
    Likes Received:
    300
    You can use the .html extension to run as a .php file, it's just a trick with .htaccess :)
     
  16. maxywaxy

    maxywaxy Registered Member

    Joined:
    Jan 4, 2009
    Messages:
    62
    Likes Received:
    9
    Thanks alot for the code looks good, gonna test it out now. And you will get the PR7 backlinks from me.

    Put this in .htaccess to get php in html files working:
    Code:
    AddType application/x-httpd-php htm html php
    AddHandler application/x-httpd-php .htm .html
    I'll post again if its all working. Thanks alot everybody so far, my first topic and the result is good:) I'll keep posting in these forums.
     
  17. Arthas

    Arthas BANNED BANNED

    Joined:
    Jan 5, 2009
    Messages:
    637
    Likes Received:
    322
    np. can you pm me links to your high pr sites?
     
  18. maxywaxy

    maxywaxy Registered Member

    Joined:
    Jan 4, 2009
    Messages:
    62
    Likes Received:
    9
    Yes done,

    Script works fine, one extra question :p could you make it that it puts the $foodname and $foodprice in $i itselves aswell? So it also fills the content of the pages with the rows.
     
  19. Arthas

    Arthas BANNED BANNED

    Joined:
    Jan 5, 2009
    Messages:
    637
    Likes Received:
    322
    wow. the information maxywaxy gave me in exchange for that script is priceless. Definitely wasn't expecting that. I feel sorry for any coder who saw his OP and decided to pass it up.
     
    • Thanks Thanks x 1
  20. plut0

    plut0 Regular Member

    Joined:
    Aug 2, 2008
    Messages:
    256
    Likes Received:
    59
    "PHPMaker is a powerful automation tool that can generate a full set of PHP quickly from MySQL database. Using PHPMaker, you can instantly create Web sites that allow users to view, edit, search, add and delete records on the Web. PHPMaker is designed for high flexibility, numerous options enable you to generate PHP applications that best suits your needs. The generated codes are clean, straightforward and easy-to-customize. The PHP scripts can be run on both Windows or Linux/Unix servers. PHPMaker can save you tons of time and is suitable for both beginners and experienced develpers alike."

    worth to try