Jump to content

skym

Members
  • Posts

    253
  • Joined

  • Last visited

Posts posted by skym

  1. nl2br() actually adds <br /> to \r\n (or to \n or to \r), it does not replace them. When counting the length of the resulting string, it will always be 6 characters longer.

    snoopy

    Hmm, looks like that Snoopy appends the port to the host in the headers he is sending: GET / HTTP/1.0 User-Agent: Snoopy v1.2.3 Host: laptops.lookup.nl:80 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Changing Host: laptops.lookup.nl:80 to Host: laptops.lookup.nl seems to solve the problem.

    snoopy

    Anybody familiar with Snoopy? http://snoopy.sourceforge.net/I'm using Snoopy v1.2.3 for a month and have recently come to a problem with a particular site. When trying to fetch http://laptops.lookup.nl/, all I get is the first few rows, just exactly a javascript code that is in the beginning of the page. At first I have thought the problem might be about code (Urchin, Google Analytics), but a few other subdomains work very well with the same JS code at the beginning.Then realized that the fetch result I get is the source you get when accessing http://lookup.nl/ (the page will show blank, but if you check the source you can see the Urchin code). http://lookup.nl/ is fetched instead of http://laptops.lookup.nl/? The problem persists with http://laptops.lookup.nl/ and other subdomains, and everything works with some subdomains (like http://computeronderwerpen.lookup.nl/) and with http://www.lookup.nl/.ALL pages are read correctly when using fopen(), file_get_contents(), fsockopen() or file(), used separately in a testing script. Snoopy is using fsockopen().Thanks

  2. You mean the logo? The src for the logo is "edesigner/edesignerlogo.jpg", change it to "edesignerlogo.jpg", since it's in the same folder as the HTML file. If you want it relative to the root of the web server, put a slash at the beginning "/edesigner/edesignerlogo.jpg".

  3. I had a similar problem long ago, when experimenting a CMS. If for some reason you are replacing all spaces with   and everything looks normal in the textarea, the words will not wrap. For the browser it's still just one long word.

    Hello world, how are you today...

  4. Single or double quotes, doesn't matter.mihalism is right, you need the underscore in the php part, but it is not necessary in the html, php will automatically convert spaces to underscores.Also don't forget to specify the method in the form tag (it is GET by default).

  5. $i doesn't depend on the length of $para in your code. It probably does seem to work if the notices are not displayed. Put the following code in the beginning of the script:ini_set('display_errors', 1);error_reporting(E_ALL);And try again. If you want the loop to stop right at the end of the array, you can use:...while($i < count($para)) { echo stripslashes($para[$i]); $i++; }

  6. Does it work? From my point of view, the first while() loop outputs the first two paragraphs, $para[0] and $para[1] (instead of only the first) and the second while() loop will go forever throwing Undefined Index notices when $i exceeds the lenght of the $para array.There's also a limit parameter for the explode function, I think I would use something like:

    ...list($para1,$rest) = explode("<br>",stripslashes(nl2br($row['contentText'])),2);echo $para1.'<br>'; //if you want a <br> between the first paragraph and the imageecho $pic;echo $rest;

  7. <script language="javascript">function changeTxt(obj){where = document.getElementById("here");what = obj.options[obj.selectedIndex].text;where.innerHTML = what;}</script><table border="0"><tr><td><select name="name" onchange="changeTxt(this)"><option value="0"></option><option value="1">some text 1</option><option value="2">some text 2</option><option value="3">some text 3</option></select></td><td><div id="here"></div></td></tr></table>

  8. Something tells me that really did not work.
    What did not work?And if you know what if() is, if you know what $_REQUEST[] is, if you know what isset() is, if you know what the form action is, and you can easily follow the code.
×
×
  • Create New...