Jump to content

ifreborn

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ifreborn's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I wanted to know if it was possible to view the Underling php code of any site on the Internet. The answer I got was no. If this is the case why do people encode their source code?
  2. need a little help understanding the structure of this parser and parsers in general. I know how the function works and the array what i dont get is what: [i][b](.+?)[/b] [/i] [i][b]([0-9]{6})\](.+?)\ [/b][/i] [code]<?php function bbcode($string){ $string = nl2br(htmlspecialchars($string)); $patterns = array(                                     '`\[b\](.+?)\[/b\]`is',                                     '`\[i\](.+?)\[/i\]`is',                                     '`\[u\](.+?)\[/u\]`is',                                     '`\[strike\](.+?)\[/strike\]`is',                                     '`\[color=#([0-9]{6})\](.+?)\[/color\]`is',                                     '`\[email\](.+?)\[/email\]`is',                                     '`\[img\](.+?)\[/img\]`is',                                     '`\[url=([a-z0-9]+://)([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^ \"\n\r\t<]*?)?)\](.*?)\[/url\]`si',                                     '`\[url\]([a-z0-9]+?://){1}([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^ \"\n\r\t<]*)?)\[/url\]`si',                                     '`\[url\]((www|ftp)\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^ \"\n\r\t<]*?)?)\[/url\]`si',                                     '`\[flash=([0-9]+),([0-9]+)\](.+?)\[/flash\]`is',                                     '`\[quote\](.+?)\[/quote\]`is',                                     '`\[indent](.+?)\[/indent\]`is',                                     '`\[size=([1-6]+)\](.+?)\[/size\]`is'                                                                  ); $replaces =  array(                                     '<strong>\\1</strong>',                                     '<em>\\1</em>',                                     '<span style="border-bottom: 1px dotted">\\1</span>',                                     '<strike>\\1</strike>',                                     '<span style="color:#\1;">\2</span>',                                     '<a href="mailto:\1">\1</a>',                                     '<img src="\1" alt="" style="border:0px;" />',                                     '<a href="\1\2">\6</a>',                                     '<a href="\1\2">\1\2</a>',                                     '<a href="http://\1">\1</a>',                                     '<object width="\1" height="\2"><param name="movie" value="\3" /><embed src="\3" width="\1" height="\2"></embed></object>',                                     '<strong>Quote:</strong><div style="margin:0px 10px;padding:5px;background-color:#F7F7F7;border:1px dotted #CCCCCC;width:80%;"><em>\1</em></div>',                                     '<pre>\\1</pre>',                                     '<h\1>\2</h\1>'                                                                                                               ); $string = preg_replace($patterns, $replaces , $string); return $string; } ?> [/code]
  3. Works fine on local host but when i try and use it on 1and1 with large 1mb+ files it returns errors. PS> i have: post_max_size = 40 upload_max_filesize = 40 Warning: imagecreatefromjpeg(): '/tmp/phpfFQFmN' is not a valid JPEG file in /homepages/29/d94614695/htdocs/bostoncomwesite/dadupload.php on line 226 Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /homepages/29/d94614695/htdocs/bostoncomwesite/dadupload.php on line 229 am i over welming the server? is it a fault in my script or is my host to blame? if so any suggestions on a new host? will i need a private server to run this script? [a href=\"http://pastebin.com/771064\" target=\"_blank\"]http://pastebin.com/771064[/a] thanks in advance
  4. What am i doing wrong? the file uploads but the resize does not occur [a href=\"http://pastebin.com/759203\" target=\"_blank\"]http://pastebin.com/759203[/a]
  5. Looking for a java script that resizes a file field picture before upload. or somthing close to it that i can toy with.
  6. ${"tom_$i"} is what i what i needed to learn thank you
  7. What am i doing wrong? how do i make $tom_ incriment? [code]<?php $var = 10; $var1_ = "sam_"; for ($i = 1; $i <= "$var"; $i++) { $tom_$i = "$var1_$i"; print "tom_$i <br>"; } ###################################### #   What i would like to see print   # ###################################### /* sam_1 sam_2 sam_3 sam_4 sam_5 sam_6 sam_7 sam_8 sam_9 sam_10 */ ?>[/code]
×
×
  • 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.