Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. HTTP response code.
  2. You can also limit your script to process only a certain number.
  3. What are you trying to do? Why should your db contain class functions?
  4. Yes. Just be sure that each include's enough keywords. Like the URL mentioned by me would meet anyone that would search for: lead-generation boost lead-generation boost lead-generation seo
  5. SEO prefers text, while database's prefer ID's. Combine the best of both worlds and make your url's look like: /42/how-SEO-can-boost-your-lead-generation/ Rewrite the url so that it returns 42 to your script.
  6. They see pages as you see the HTML source or better how Firebug sees the source as Google knows if an element has display:none applied. Most, if not all websites work this way. Google itself provides sufficient information for webmaster's search for GoogleWebmasterHelp channel on YouTube, in the Webmaster section you can also find some document providing some pointers.
  7. Don't rely on $HTTP_ you should use $_GET, $_POST, $_COOKIE, .. instead.
  8. Download a newer version of browscap.ini@http://browsers.garykeith.com/downloads.asp
  9. And what make up the values of $title and $description? $dom = new DomDocument(); $directory = ''; foreach (glob("$directory/*.xml") as $file) { $filepath = realpath("$directory/$file"); if ($dom->load($filepath)) { $xpath = new DomXPath($dom); foreach ($xpath->query('//PARA') as $node) { //$title?? $description = $node->nodeValue; if ($node->hasChildren()) { $imageUrl = $node->childNodes[0]->getAttribute('href'); } } } }
  10. Ah yes, I missed the http:// part. I was a bit confused by AlexWD's post.
  11. And what is the desired end-result? That all files are one?
  12. $picture->item(0)->getAttribute(..)
  13. Returns the content as-is which means that if you output it the PHP code will be visible in the HTML source. It obviously needs to be include('http://www.thesite.com/thepage.php'); (with allow_url_fopen, PHP is parsed on the server) or better yet include('thepage.php"); (PHP is parsed on your server) which will parse the PHP.
  14. The correct method name is getAttribute()
  15. Care to share how these XML files then look like? And what the end-result should be?
  16. ignace

    BBCode help

    $count = 0; do { $text = preg_replace($match, $replace, $text, -1, $count); } while (0 < $count);
  17. $result=mysql_query($sql) or die("cannot run " . mysql_error());
  18. This should give you a good idea: $dom = new DomDocument(); $root = $dom->createElement('files'); $directory = ''; foreach (glob("$directory/*.xml") as $file) { $element = $dom->createElement('file', $directory . DIRECTORY_SEPARATOR . $file); $element->setAttribute('dirname', $directory); $element->setAttribute('basename', $file); $element->setAttribute('extension', 'xml'); $element->setAttribute('filename', pathinfo($file, PATHINFO_FILENAME)); $root->appendChild($element); } $dom->appendChild($root); print $dom->saveXml(); This extensive information (setAttribute()) is to use with XPath so that you can select all files with a certain extension for example later on with an XSLT-sheet: //[@extension="xml"]
  19. Generate a unique referral link for each visitor. When someone visits your website with a referral link then add 1 to the referral link together with their IP-address (although this is a pretty weak security against referral link spamming). Then whoever referred it to their friends can use the referral link to see how many he has referred (visible to everyone). But like cs.punk already told you it's best to use a username/password, it solves really many problems you will otherwise face. To give an example referral identity theft? Multiple people claim to be the owner of a certain referral link...
  20. And learn PHP as echo (' <tbody> <tr> <td bgcolor=$bg3>' does not output what you think it will output.
  21. You don't need that just change the domain or path for your cookies. If it's possible to create sub-domains (newapplication.mydomain.com) you can make the cookies sub-domain specific, like: session_set_cookie_params(.., '/', 'www.mydomain.com', ..); session_set_cookie_params(.., '/', 'newapplication.mydomain.com', ..); Or if that's not an option: session_set_cookie_params(.., '/newapplication/', ..); Will set it for /newapplication/ alone although I think this may have the problem that $_SESSION will exist if they come from www.domain.com. However they are no longer logged in on www.domain.com if they came from /newapplication/
  22. Make that "object oriented".
  23. Why str_replace() on 1 character? Just compare it and change it, like $Byte = substr($String, $i, 1); //takes one character $NewString .= '%' === $Byte ? randomchar() : $Byte; Or something like: $char = '%'; $string = '12%12%12'; $pos = -1; while (true) { $pos = strpos($string, $char, $pos + 1); if (false === $pos) break; $string[$pos] = randomchar(); }
×
×
  • 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.