Jump to content

maddogandnoriko

Members
  • Posts

    63
  • Joined

  • Last visited

    Never

Everything posted by maddogandnoriko

  1. I have an array filled with links. Is it possible to get all elements that contain google.com? And if so is it also possible to remove those results from the original array? I am currently doing it with a for each loop and was just wondering if there is a one step solution... todd
  2. Jeez...what a doofus I am! I assumed the preg_replace was just going to replace it in the content as is. I did not assign the preg_replace results to a variable. I really feel stupid sometimes. Thank you for the help!
  3. to get all youtube links I am using: preg_match_all( "/<a[\s]+[^>]*?href[\s]?=[\s\"\']+(http:\/\/youtube.*?)[\"\']+.*?>/",$this->html,$links ); So I thought the same would work to replace them all with nothing, but it does not. Any hints as to why? preg_replace( "/<a[\s]+[^>]*?href[\s]?=[\s\"\']+(http:\/\/rapidshare.*?)[\"\']+.*?>/",'',$this->html); Thanks to all, Todd
  4. Is there a way to know if it is still running? More importantly is here a way to not have 100 running at a time? The pages vary in density with links, some may have none a large one has thousands. I am not worried if one or two overlap but I probably don't want a bunch running at the same time. Any suggestions? Todd
  5. The only way I knew mine was still running was I had an error and my error log kept popping up. Thank you for your answers Todd
  6. excellent! That is what I wanted to know. What happens if I stop it in the browser and reload the "page" does another copy of the script run or does it wait until the first one is done? Todd
  7. I have a fairly long script that is checking links. For the time being I am calling it in my browser and running it on my local server and echoing stuff back to see what is going on. When it is running and I click the stop button does the script stop executing also or does it continue to the end? On the same note if it does still run what happens if the script gets called again? Thank you very much, Todd
  8. Ok. I am trying to learn oop a little better, so I may go that route. Are there any major performance issues? From my point of view, it seems weird using a class to do many things on many variables. To me it seems like it should be a class for each link...which is ridiculous. Is there any downfall of using a class frequently like a function? Todd
  9. I have just recently begun oop programming with php. I am going to write a link verifer for my site that will go through many links and make sure they are valid. My question is....is this better suited for a class or function? For the sake of argument the link list will vary from just one links to many hundreds.... All help is appreciated, Todd
  10. The users info is stored in a session variable. I was not clear...I tend to do that. Say the spanish user is viewing the 'Lost' television show. If he wants to view episode 1 info I am now: query#1: getting episode 1 info that is the same for all languages, original airdate, rating, airtime etc. query #2: getting the info translated into spanish(title, description) what i want to do in 1 query is get the base episode info and the spanish description, but if the spanish description is empty, get the english description. Todd
  11. I am building a tv database site and will eventually support multiple languages. My db has a table with non-language based info and another table that has a couple of language based rows(show description&title). What I need help with is the language row selection. I get the 'base info and left join the useres language info. Simple. But what I would like is: select base info left join language info(get users language info BUT if that doesn't exist use english info instead) Can this be done in one query? Thank you very much for ANY advice given Todd
  12. BTW, I do have an active account....username and password. Just wanted to be clear I am not trying to anything wrong. todd
  13. I have been asked/offered to write a link checker for an SMF forum. For whatever reason I do not have access to the MySQL DB so I am doing it the long way...using curl. All pages require login to view. I did the standard curl login thing...but there is a hitch....onsubmit this javascript encodes the password. What is the best way to handle this? Thanks Todd onsubmit="hashLoginPassword(this, 'f23a16bc9e3ddc343f55e76fe0cc2732');" function hashLoginPassword(doForm, cur_session_id){ (abbreviated).... doForm.hash_passwrd.value = hex_sha1(hex_sha1(doForm.user.value.php_to8bit().php_strtolower() + doForm.passwrd.value.php_to8bit()) + cur_session_id); }
×
×
  • 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.