Jump to content

Nick

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by Nick

  1. Something like this will make it kind of hard for people to see your download location. They'll never see it in the source and unless they're using Telnet or something like it they wont see the Location header either.

    <a href="download.php?id=1">

    Then have a MySQL database with a list of files with unique id's. Make download.php have:

    <?php $id=$_GET['id'];mysql_connect("127.0.0.1",$user,$password);mysql_select_db($database) or die( "Unable to select database");$query="SELECT name FROM files WHERE id='$id'";$result=mysql_query($query);$name = mysql_fetch_row($result);header("Location:http://example.com/".$name[0]);exit;?>

    You could also have the id/filename references in a text file or something like that instead. The idea is to send an HTTP header to silently redirect to the file.

  2. Also PHP appears to be significantly more complex to set up. What would I need at my end? I've down loaded this free PHP editor. http://www.mpsoftware.dk/
    You don't need much. That should work fine. I use notepad myself, so pretty much any program will work. :)
    I assume if I start to use PHP then all the clever stuff happens server side, so the popup blocker never gets triggered?
    Correct. The current date will simply be sent as if it was just regular text. PHP scripts are completely undetectable (except for the fact the the file extension is usually .php :) )
    Oh one last thing, can you use PHP to switch and image on a mouseover event? At the moment I use a bit java script to do that.
    No, php creates the content before it's sent to the user, whereas javascript does this afterward. So php can't do things onmouseover. However, you can still put javascript in your php pages just as you would put html in them.
  3. There aren't many large differences. Xhtml is extensible though, which means you can add new tags into it with different xml namespaces. An example of this is using xhtml+mathml together in web pages. Personally, I haven't figured out how to do it, but I'm told it's possible. :)You should use xhtml though. It's the future of html, and it's not very hard to deploy if you already write pages in html 4.01 strict.

  4. XML is a way to store data. I guess you could think of it almost as a text database. For the purposes of this site, it's generally used along with XSL to transform it into something like xhtml to make web pages. However, it has a lot of other uses too. For example the Jabber protocal, used to create several chat clients, transmits it's data in the form of XML.

  5. I'm not sure what the problem is. I see a yellow picture there that says "Lissa Explains it All" I'm assuming that's what you're talking about.Try pressing ctrl+F5 in case somehow the cache survived. (I know you said you deleted it, but computers are evil that way sometimes.) That'll tell it to refresh without cache.

  6. Either turn off the <? shortcut in your php.ini or do something like this:

    <?phpecho '<'.'?xml version="1.0" encoding="utf-8"?'.'>';?>

    That should result in <?xml version="1.0" encoding="utf-8"?>

  7. Well, you could use css. However, you'll be severly limited.I believe when you use CSS it just goes with the default template for all tags, which is just to treat them as raw text. You can only say how you want that text to be displayed.That means that tags like <a> and <img> can't work because you can't transform them into a link or image, just text.So you could make a semi-functional web page. (Text wil coloring and styles) I don't think you could make a functional web site. :)

  8. As far as I know, you'll need to somehow transform it.XML is not a language like HTML or XHTML. It's just a way of storing data. You would generally use XSL to transform your XML data into XHTML or something like that.XML is not just used in websites. Again, it's only a method of storing data. XSL is used to display that data.

  9. If you had something like this:<picture location="http://example.com/imagelocation.png" description="An image" />Your XSL stylesheet might look something like this:

    <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" ><xsl:template match="/"><html><head><title>A picture</title></head><body><xsl:apply-templates /></body></html></xsl:template><xsl:template match="picture"><img src="{@location}" alt="{@description}" /></xsl:template>

  10. Try posting more of your script and I should be able to help you.Right now the only problem I see is that this:

    echo "<font color='red'>". $i ."</font>

    Should be this:

    echo "<font color='red'>". $i ."</font>";

    Please post more than three lines though so I can see what you're trying to do.Also, you may want to use   instead of a space to make sure that the web browser shows the space.

  11. I don't know if this is your problem or how you would fix it with asp, but I had a similar problem with php not outputting xml files right.IIS or whatever interprets .asp files probably uses the mime type 'text/html' by default for your files. This does not work with xml. If there's an asp equivilant of php's header() function, (to send HTTP headers) try sending the header, 'Content-Type: application/xml;' at the begining of your asp file.That's the only thing I can think of. Sorry I never really looked into .asp much so I can't help with how to do that. Hope you can figure it out.Edit: I think you can do something like:

    <%Response.ContentType="application/xml"%>

×
×
  • Create New...