.jpg with source code

Discussion in 'HTML & Website Design' started by ntesla123, Jan 16, 2011.

  1. #1
    How do I create a .jpg file on my website that has a source code where I can edit html, javscript, php etc

    E.g. this website doesn't have a source code, because it's only a jpg:

    http://arnab.ca/site/wp-content/sexy-linux.jpg

    This website, however, does have a source code, and it's still .jpg:

    www.filesonic.com/file/52944183/mr_cool.jpg
     
    ntesla123, Jan 16, 2011 IP
  2. subdivisions

    subdivisions Well-Known Member

    Messages:
    1,021
    Likes Received:
    40
    Best Answers:
    1
    Trophy Points:
    145
    #2
    The second one is probably just a rewritten query string. (site.com/file.php?name=something.jpg becomes site.com/file/something.jpg with mod_rewrite)
     
    subdivisions, Jan 16, 2011 IP
  3. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #3
    he's definitely asking for something else, but I can't understand what :(
     
    atxsurf, Jan 16, 2011 IP
  4. subdivisions

    subdivisions Well-Known Member

    Messages:
    1,021
    Likes Received:
    40
    Best Answers:
    1
    Trophy Points:
    145
    #4
    He wants to use the .jpg file extension for HTML files.... I think. Come to think of it, you could also just assign the .jpg extension to PHP files with this in .htaccess:

    AddHandler php5-cgi .php .jpg
    Code (markup):
     
    subdivisions, Jan 16, 2011 IP
  5. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #5
    I don't think so @subdivisions

    What he is "asking" for is about the download script like filesonic.

    In that case it's done with mod_rewrite or lets say the script is appending the file you want to download to the URL.

    I would search for image hosting scripts or something like that.
     
    CSM, Jan 17, 2011 IP
  6. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #6
    @ntesla123, Best is, re-frame your question..
     
    radiant_luv, Jan 17, 2011 IP
  7. backlinkexcellence

    backlinkexcellence Peon

    Messages:
    197
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    OP, try out this suggestion and let us know if that worked. If you were looking for hosting scripts you should have said that.
     
    backlinkexcellence, Jan 17, 2011 IP