Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Best posts by qbert220

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
  1. qbert220

    Simple issue on a SMF forum

    Replace: <a href="www.linktopagethatiwant.com"> with: <a href="http://www.linktopagethatiwant.com">
  2. qbert220

    Zend Pdf Images help.

    You could get the image dimensions and use them when drawing the image. For example, // Draw Logo $imagePath = "../users/".$this->user."/logo.jpg"; list($width, $height, $type, $attr) = getimagesize($imagePath); $image =...
  3. qbert220

    Script to Sort List of Words by Character Length...

    <?php $array = array ( 'anteater', 'bear', 'cheetah', ); function cmp($a, $b) { return strlen($a) - strlen($b); } usort($array, 'cmp'); print_r($array); ?> If the string you want to search are in a file, then: $array = file('filename.txt', FILE_IGNORE_NEW_LINE);
  4. qbert220

    Just a little help.

    You might want to look at strtr also: PHP: strtr - Manual $adr=strtr($rowcat['cate'], ' AB', '-ab');
  5. qbert220

    Can anyone figure out this?

    You probably mean you get a backslash ("\"), not a forward slash ("/"). If this is the case it is probably caused by the magic_quotes feature of PHP. The best thing to do is probably disable magic quotes by adding the following to your .htaccess file: php_flag magic_quotes_gpc off...
  6. qbert220

    PHP + MySQL Commit?

    To use transactions, you just need to execute the right queries from your PHP script (obviously make sure your database supports transactions): mysql_query("START TRANSACTION"); mysql_query("UPDATE t1 SET field='value1'"); mysql_query("UPDATE t2 SET field='value2'"); mysql_query("COMMIT"); If...
  7. qbert220

    MySQL / PHP Question

    $result = mysql_query($sql); if ($result) { while ($item = mysql_fetch_object($result)) { echo "Link: $item->Link, NumOccurrences: $item->NumOccurrences<br />\n"; } } else { echo 'MySQL error : ' . mysql_error(). "\n"; }
  8. qbert220

    [Need Php help] Code modification needed - copy pswd protected file form url to my server

    I guess the pages you want to copy are not http password protected. What form of password protection do they use? If they are cookie or session protected, then you'll need something more complicated. It is possible to support cookies with http wrappers, but not obvious. Using libcurl might be a...
  9. qbert220

    Help Needed! Text Area & HTML Code In PHP

    If you still get the parse error, post your PHP code and we should be able to help you. As a guess, it may be that you've added a quote character without escaping it. e.g. echo '<div id='text'>See how easy it is to copy this?</div>';will generate a parse error. To fix it, you need to escape...
  10. qbert220

    Alternative to PHP 'Include'?

    If site1.com and site2.com are maintained by different people and site1.com includes the following code on their server: <?php echo file_get_contents(urlencode("http://www.site2.com/file.html")); ?>then the owner of site2.com could inject site1.com with an XSS script. Also, if site2.com is...
  11. qbert220

    Php updater script

    The following should do what you want. It needs FTP and ZIP support compiled into your PHP installation. <?php //////////////////////////////////////////////////////////// // START OF CONFIGURATION //////////////////////////////////////////////////////////// // Set to the directory...
  12. qbert220

    PHP search script for multiple words

    This won't work if you swap the search words round. Your final query would be: SELECT * FROM `$table` WHERE title LIKE '%gtb%ferrari%' which would not match. As an alternative to mholt's answer, you could use str_replace to replace spaces with additional parts of the query something...
  13. qbert220

    Folder on addondomain redirects to root ...

    Two alternatives - a soft link or mod_rewrite. Soft links don't always work (apache can be configured to disallow them). mod_rewrite may not be supported on your server (ask your host). If you have shell access, login, then: cd public_html/new.com ln -s ../arcade . If you don't have...
  14. qbert220

    [PHP] file_get_contents and regex

    The ? has 2 different meanings, depending on context. After a normal character or expression is means one or zero occurrences of. After a normally "greedy" operator it makes it non-greedy. Greedy means that the operator will match as much as possible. * is normally greedy, so the if you...
  15. qbert220

    Switching Hosting with Several Subdomains

    Yes - you can do this without downtime. First, you need to get your new hosting account setup. Use the control panel to create your subdomains, then add all of your content to it using FTP and the IP address of the server. You may be able to test your new site using a preview URL (e.g. if...
  16. qbert220

    MX record is not uniform

    Your web is configured incorrectly (IMO - your admin may disagree :red:). You could try to persuade them to change their mail server configuration to send to MX records rather than delivering to the local address. Alternatively, you could bypass their mail server and go straight to...
  17. qbert220

    Does the domain name extension affects rankings and general impression?

    I don't believe it makes a difference to the search engine ranking. I've got a .info that appeared as #1 for a single word search term for several years (now #4). I do however believe it makes a difference to how likely a visitor is to click on a search result. For me, a ".info" is fine if...
  18. qbert220

    Forward deleted pags to index.html

    You can use: Redirect permanent /deleted_file.html http://www.yoursite.com/ Or you could use a custom 404 page which redirects (this is what I do on some of my sites): in .htaccess add: ErrorDocument 404 /404.php Create a new file called 404.php with the following: <?php...
  19. qbert220

    auction Sold

    SOLD at BIN $15
  20. qbert220

    auction Sold

    SOLD at BIN $15
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

Watched threads: your alert now keeps up with new replies
When you watch a thread, each new reply now updates your alert. Before, you got one alert and then nothing until you read the thread...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back