Jump to content

forumnz

Members
  • Posts

    735
  • Joined

  • Last visited

Posts posted by forumnz

  1. Hello

     

    I am using a script I found on the internet to create PNG images of text into a font on the server.

     

    My problem is that I  can't seem to make the font bold.

     

    Can someone please let me know how to do this? I would really appreciate the help.

     

    Here is a snippet of the code that I believe needs modifying:

    <?php
    $background_rgb = hex_to_rgb($background_color) ;
    $font_rgb = hex_to_rgb($font_color) ;
    $dip = get_dip($font_file,$font_size) ;
    $box = @ImageTTFBBox($font_size,0,$font_file,$text) ;
    $image = @ImageCreate(abs($box[2]-$box[0]),abs($box[5]-$dip)) ;
    ?>

     

    Many thanks.

  2. I did some error reporting and I got:

    Notice: Undefined variable: con in /var/www/vhosts/pricelesswebsites.co.nz/subdomains/client/httpdocs/SignUp/upload.php on line 8
    
    Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/vhosts/pricelesswebsites.co.nz/subdomains/client/httpdocs/SignUp/upload.php on line 8

     

    Line 8 is:

    mysql_select_db("maindb", $con);

     

    (with the error reporting code.

     

    Help please?

  3. I am trying to get an id from a table where clientid is equal to a session var. I know the session is set because if I echo it, it shows up, and I know there is a row in the db that matches because I am looking at it right now.

     

    The problem is, the query is not selecting any data. I need to select the clientid from the table so I can set another session var.

     

    Please please help my brain is not coping! Thank you!

     

    <?
    session_start();
    $uid = $_SESSION['logid'];
    
    include('../connectdb.php');
    mysql_select_db("maindb", $con);
    
    $result = mysql_query("SELECT * FROM projects WHERE clientid = $uid");
    
    while($row = mysql_fetch_array($result))
      {
    echo $row['id'];
      }
    
    ?>

     

    I'm down to just echoing the row to problem solve but nothing comes up.

  4. I have an AJAX script which queries a DB when a user inputs a search text. That's great, works well.

     

    However, when I use mysql_real_escape_string, it seems to completely rid the '$q'. When I don't use it, it works well but of course, there's the security side of things.

     

    Here's the code snippet:

     

    <?php
    error_reporting(E_ALL);
    $q = $_GET["q"];//added mysql_real_escape_string
    //$q = mysql_real_escape_string('$_GET["q"]');
    
    $con = mysql_connect("localhost","aaaaa","aaaaa");
    
    if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }
    
    mysql_select_db("aaaaa", $con);
    
    $sql="SELECT * FROM articles WHERE keywords LIKE '%$q%'";
    ?>

     

    It seems so simple, but its just not working. What could it be?

  5. Thanks for that. I'm trying to search .nz domain names and have found that there is whois server located at whois.domainz.net.nz so I have done:

    '.co.nz' => array('whois.domainz.net.nz','No match for'),

     

    Problem is, it says that every domain I search is taken. I know for a fact that some that I searched are available. What could be causing this?

  6. Hello all, it's been a while! Good to be back.

     

    I am having trouble with a script I'm trying to modify to seach for domains with specific extensions.

     

    Now, I have never done any domain checking before and I'm a little bewildered.

     

    The script uses an array and checks the input against each extension using the array.

    Each line looks similar to:

    '.com' => array('whois.crsnic.net','No match for'),
    

     

    What does the whois.crsnic.net mean? I assume it's a register/database of domains?

  7. Hey Guys!

     

    I've been tasked with designing a website for a medium sized furniture company. Now I'll be the first to admit, I'm a code monkey, not a designer, though I've dabbled in design.

     

    I need some aggresive critiquing done on this initial design... please!

     

    I will take all your comments/critisisms and ideas on board and I will respond to everybody's messages.

     

    http://designervision.co.nz/sd

     

    I appreciated the effort!

     

    Cheers,

     

    Sam.

  8. Thanks guys! Much appreciated. I have taken into account what you both have said.

     

    I wish to keep the homepage with that slider, however I have edited the other sections to include separate pages.

     

    Please see www.designervision.co.nz/pw/Free and www.designervision.co.nz/pw/Portfolio

     

    Let me know your thoughts :)

    Thanks

    Sam

  9. I posted about this design a while ago, but now it's revised. I know it's not quite right, however I can't figure out what needs to be done to make it right.

     

    Any ideas/tips are appreciated.

     

    www.designervision.co.nz/pw

     

    Thanks

    Sam

  10. Thanks for the posts everyone :)

     

    MrAdam, what would you suggest? I am quite stuck at the moment.

    I actually should have expanded on the first post a lot more.

     

    We are actually going to provide free websites in exchange for a min 1-year hosting contract.

     

    Any ideas?

    Thanks for your time everyone :)

     

    Sam.

  11. Hi I'm trying to perform an SQL injection on some code I'm writing (just for fun, to see how it works).

     

    I have written this line to gather some DB info.. what could I do to the input field as a injection?

     

    $sql = mysql_query("SELECT name FROM test WHERE name='".$_POST['name']."'");
    

     

    Thanks :)

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.