User Profile

Collapse

Profile Sidebar

Collapse
jeddiki
jeddiki
Last Activity: Sep 6 '14, 03:57 AM
Joined: Jan 14 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jeddiki
    started a topic Build a table copied from different database in PHP
    in PHP

    Build a table copied from different database in PHP

    Hello
    I am wanting to copy all data from one table to another.

    I am using PHP and MySQL

    I have done this with tables that in the the same database,
    but is it possible to do this with tables that are run by different
    virtual servers ?

    So I want to quickly build a new table on QR-KUPONS from MOBI6

    This is my "usual" backup script.


    Code:
    $sql
    ...
    See more | Go to post

  • OK -

    Well, I'm gonna sit down and write out what each
    of these lines of code means long hand,
    then ...

    I'll figure out a way to make it go through the array sequentially instead of randomly.

    Can't be that hard ... can it ?


    I was hoping that someone with a faster brain than mine, or more experience/expertise could quickly see how this could be done.


    There...
    See more | Go to post

    Leave a comment:


  • Hmm - read some of them but found them
    a bit over theoretical. - But thanks anyway.

    I was hoping for something a bit more down-to-earth,
    something I can write into my code, similar to the above.

    ...
    See more | Go to post

    Leave a comment:


  • Thanks Dormilich,

    However, as my code is written in procedural code,
    I was hoping to just change a few lines in my above code to
    do what I need :)

    Is it not so easy then ? ...



    .
    See more | Go to post

    Leave a comment:


  • jeddiki
    started a topic How to Calculate Article Uniqueness ?

    How to Calculate Article Uniqueness ?

    When publishing a new article to our website we want to ensure it is unique.
    - unique to our own website at least.

    Of course there always similar articles around so there are softwares that calculate the uniqueness of your article.

    But how do they usually calculate it - and in particular, how does Google calculate it ?

    Here is one approach that I came up with based on what I have read.

    1)...
    See more | Go to post

  • How do I change this function from Random to Sequential

    Hi,

    I am using this function which is
    used to spin text.

    Currently it looks to me like it is selected an
    element from the $tStringToken array at random.

    These two lines seem to be doing that:
    Code:
    $i = rand(0,$tStringCount); 
    $replace = $tStringToken[$i];
    I would like to change this so that it goes sequentially through
    all of the available elements in the...
    See more | Go to post

  • jeddiki
    started a topic How can I adjust my php emailer script ?
    in PHP

    How can I adjust my php emailer script ?

    Hi,

    I have built and implemented a simple emailer script to send out emails
    using fgets fput etc.

    First I have a cron job build an email queue table
    then a different cron job to check the queue and send out emails.

    If the emails fail then they stay on the queue for 6 attempts.

    At present it opens a new socket each time it sends an email
    which must be slowing it down....
    See more | Go to post

  • jeddiki
    started a topic Simple regex problem - please help.
    in PHP

    Simple regex problem - please help.

    Hi ,

    My simple redirect is working EXCEPT if there is a period in the string.

    This is what I have:


    Code:
    RewriteCond %{HTTP_HOST} ^([^.]+).example.net [NC]
    RewriteCond %{HTTP_HOST} !^www.example.net [NC]
    
    RewriteRule ^.*$ http://example.net/disp_page.php?a=%1 [NC,QSA,L]
    So this works fine with :

    potatoes.exampl e.net

    that goes to example.net/disp_page.php?a =potatoes...
    See more | Go to post

  • jeddiki
    started a topic Allowing underscore in preg_replace
    in PHP

    Allowing underscore in preg_replace

    Hello,

    I am using this:
    Code:
    preg_replace( somestuff  (.+?)  somestuff  );
    Does that (.+?) allow the underscore ?
    From my results, I suspect it doesn't

    To include the underscore, do I just add it like: (._+?) ?

    Don't know why but I think this might be wrong.
    See more | Go to post
    Last edited by Niheel; Mar 9 '11, 07:41 PM.

  • jeddiki
    started a topic Why is my search box image not displaying ?

    Why is my search box image not displaying ?

    Hi,

    In my html I have a menu and a search box which should display a search image.

    When I look in the source code - the image is there and if I browse to the image url - it displays, BUT it does not display on my page !!!

    This is the page url:

    http://www.expert-world.com/forum/index.php

    This is the url for the search box image:

    http://www.expert-world.com/f...
    See more | Go to post

  • Thanks for your reply.

    I appreciate your opinion.

    If I hash the passwords though, I guess that it means I can not send the account owner their password in an email ... or can I ?

    When my script sends the hashed password out to the owner, can the user see it in their browser as the password they need to enter ?

    Thanks for any clarifications.


    .
    See more | Go to post

    Leave a comment:


  • How important is using password() encryption function ?

    Hi,

    I have noticed that some website do not use encryptiom for passwords as they are able to send you the existing password.

    Others can only give you a new password, so I guess they are using encryption ( ? ).

    Does it really matter ?

    Can anybody look at my MySQL database and see the password if it is not encrypted ? Or is it only in transmission that it could be spied on ?

    ...
    See more | Go to post

  • jeddiki
    started a topic How do I convert doashes to underscores?
    in PHP

    How do I convert doashes to underscores?

    Hi,

    I am trying to change dashes to underscores in text file.

    The reason is that I am having problems processing some xml tags
    so I want to change this <merchant-name> to <merchant_nam e>

    To do this I used this regex:

    Code:
    $pattern = '#<(\w+)-(\w+)>#';
    $replacement = '<$1_$2>';
    $source = preg_replace( $pattern, $replacement, $source, -1 , $count);
    ...
    See more | Go to post

  • jeddiki
    replied to How can I check the size of an image file ?
    in PHP
    Sorry for delay,

    It was a got try - but as I suspected, the image returned image shows up as a successful response even though it is not the requested image.

    When the image you want is not available it
    sends this standard image:




    And as it is not an error page, my script has now stored
    it as the correct image to be served.

    So in order to cache correct images I wanted...
    See more | Go to post

    Leave a comment:


  • jeddiki
    replied to How can I check the size of an image file ?
    in PHP
    OK - I see what you mean.

    I have incorporated that into my script:

    Code:
    if(file_exists($image_loc)) {
      echo "<img src=\"$image_file\" width='300px' height='200px' alt='Please wait while thumbnail for $title_sht loads.'>";
      }
    else {
      $url = "http://www.sd5.info/imager/webthumb.php?prod_id=$Db_prod";
      $url_head = get_headers($url);
      if($url_head
    ...
    See more | Go to post

    Leave a comment:


  • jeddiki
    replied to How can I check the size of an image file ?
    in PHP
    Thanks for reply,

    Maybe I was not clear.

    I am using an image serving service, and if it can not create the image
    then it serves a "standard" "Can't Create Image" image and returns that.

    It then queues the image for later recovery. So I was not meaning the 404 page
    but their standard "Can't Create Image" image" (4.49KB )

    Now if it serves that image,...
    See more | Go to post

    Leave a comment:


  • jeddiki
    started a topic How can I check the size of an image file ?
    in PHP

    How can I check the size of an image file ?

    I want to check the size of an image file before I write it.

    If it is a certain size, then I won't write it.

    Can I check the future size of the file by
    using strlen() on the file_get_conten ts($url);?

    Here is my script:

    First I get the image from an image website,
    but if the image is the standard error image ( "Can't find image" ),
    then I don't want to save it:
    ...
    See more | Go to post

  • jeddiki
    replied to page display problem on wide screens
    I am using Moz FF 3.5.8.

    I just checked in IE andthe grid shows up fine.

    OK - I will just assume its my funny version of Moz FF.

    For ages I had a horizontal line across the middle of this
    website on Moz FF, but nobody else could see it !!

    Now it looks like it is taking a line out.

    I assume that you can see that iti is missing in the
    image I posted ?
    ...
    See more | Go to post

    Leave a comment:


  • jeddiki
    replied to page display problem on wide screens
    Well,

    That looks just great to me !

    I will have to check again tomorrow on my friends monitor

    (maybe I will get him to loan it to me for a day )

    One other thing.

    I have a very curious missing grid line on my table:



    This is the page:

    Test Page

    I can not see why it is not there :(

    Any ideas ?
    ...
    See more | Go to post

    Leave a comment:


  • jeddiki
    started a topic page display problem on wide screens

    page display problem on wide screens

    Hi,

    I have been busy making my page look good in Mox FF,
    Opera and IE according to my 17" (the diagonal) LCD screen
    and of course made sure that it validated.

    Then today I saw it on a friends monitor which is about
    50 cm (20 inches) wide and my tables with their
    headings are getting messed up.

    Problem is I didn't have access to my ftp details at the time
    and now...
    See more | Go to post
No activity results to display
Show More
Working...