1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to to Save google Script in mySQL using PHP

Discussion in 'MySQL' started by bryan15, Feb 21, 2012.

  1. #1
    I have tried lot but failed to save any script in database using PHP actually i have to save my google analytic code in that and want to echo out at main page, i used TEXT, VARCHAR etc and i use simple input text or textarea, i think it is the prob due you using < ' > char, can any one help me.


    Thanks in advance
     
    bryan15, Feb 21, 2012 IP
  2. soundguy

    soundguy Member

    Messages:
    77
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    25
    #2
    u cant harvest or steal :D any php scripts, because they are run at the server and only their output is sent to you (your browser).
    Javascript u can save by just copying the source code out from html source.
     
    soundguy, Feb 21, 2012 IP
  3. bryan15

    bryan15 Greenhorn

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    actually you didnt get my question i believe
     
    bryan15, Feb 21, 2012 IP
  4. soundguy

    soundguy Member

    Messages:
    77
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    25
    #4
    oh, i see. use VARCHAR or TEXT (it doesnt matter), use appropriate encoding for those field (i.e. UTF-8)
    then you will need to encode >< before saving to mysql with some algoritm.
    then when getting code from mysql, u need to use inverse algoritm to decode it back.. simple. i think u can google the solution, which i'm sure, already someone published, like i can.
     
    soundguy, Feb 21, 2012 IP
  5. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,883
    Likes Received:
    34
    Best Answers:
    51
    Trophy Points:
    100
    #5
    Store in a BLOB field.
     
    Rukbat, Feb 25, 2012 IP
  6. bryan15

    bryan15 Greenhorn

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #6
    Hi i have checked just now it is also NOT working :(
     
    bryan15, Feb 25, 2012 IP