Jump to content

Anag

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Anag's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I use wordpress as a frontend for my site and the members area has been built on zend framework. After they login from the wordpress site which is just a form template pointing to zend they end up in the zend area with a zend session. If they leave the members area and are on the front end website id like the Login link in top right to display My Account so they can click it and go right back to their dashboard. How can I get the zend session in wordpress?
  2. I'm working on lowering shopping cart abandonment rates for a client. I'd like to be able to post form data from individual input fields of a registration form to a php script, every time onblur fires. The form fields would need to keep the value entered by the visitor and page shouldn't refresh so I think Ajax is the best solution. Any example code that does this would be appreciated. Thanks
  3. The script is parsing data from 90 URL's it finishes in about 10 seconds but for a few seconds CPU is at 100% usage. Setting sleep or usleep(1) causes it to take 140 seconds to complete and thats way to long. My php.ini has a very high execution time, and 2 gigs of RAM but I have no memory issues just CPU. Some people in another forum suggested curl_multi_exec so going to try that.
  4. This is a loop used in our script with curl. It's causing CPU usage to shoot up to 100%. A friend said "Your computer is looping so fast here it doesn't have time to process the request since it is constantly checking for a finish."... So my question is how can this loop be re-written to slow down? Thanks $running = null; do { curl_multi_exec($mh, $running); } while($running > 0);
  5. The files do not exist i am trying to create all new files using the content in this script
  6. This is the warning i get it repeats for each entry in keywords.txt. New York is on the first line Warning: fopen(New York .txt) [function.fopen]: failed to open stream: Invalid argument in C:\script.php on line 5 Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\script.php on line 17 Warning: fclose() expects parameter 1 to be resource, boolean given in C:\script.php on line 18
  7. Hello, I'm working on a script which should read lines from a file keyword.txt create a new file with that variable name, insert the content close and loop through all the lines in the keyword file. The loop itself works but now that i'm adding the fopen fwrite and fclose i'm running into trouble. I'm not that great a coder and have pieced this together so far. I'd appreciate any suggestions on how to fix the fopen and other file functions to create unique files using the keywords from the file Thanks in advance <?php $read_file = file('keywords.txt'); foreach($read_file as $var) { $file = fopen($var, "x"); $content = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\"> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> <title>This is the title</title> </head> <body> <h2>The keyword is $var</h2> <p><p> </body> </html>"; fwrite($file, $content); fclose($file); } ?>
×
×
  • 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.