Jump to content

jhbalaji

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jhbalaji's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. if you have no experience in PHP or mySql then just have a look in a simple login site i wrote http://jhbalaji.users.phpclasses.org/simple-login-class It simple to understand and will teach you the basics
  2. My suggestion is best to embed that in a flash
  3. Tried that! Some what works Basically if a Image URL has a form of Space the it also replaces that! But it temporarily fixes my problem Thanks Again!
  4. In simple words It should replace the keyword i specified into links but whenever it founds HTML Tags say Anchor Tag or Image Tag it should skip the Word in between those tags can also be defined as i need a regex pattern in which it should turn the keywords into links in a Paragraph without messing inbetween HTML Tgas Thanks for your Help salathe
  5. Hello everyone i am writing a snippet for replacing the keywords into links. It almost works but it also replaces the words in between HTML Tags So can anyone help me in fixing that <?php $textlinksname = 'Google'; $textlinksurl = 'http://google.com'; $body = 'Google is a great search engine. Here is the logo of it <img src =\'http://www.google.co.in/google/images/srpr/logo1w.png\'/>'; $replace = "<a href='".$textlinksurl."' target='_blank'>".$textlinksname."</a>"; $body = preg_replace('~(?<!http://|www\.|/)'.$textlinksname.'~i', $replace,$body,200); echo $body; ?> It outputs as <a href='http://google.com' target='_blank'>Google</a> is a great search engine. Here is the logo of it <img src ='http://www.google.co.in/google/intl/en_com/images/srpr/google-123-<a href='http://google.com' target='_blank'>Google</a>.png'/> But i need output like this such that it wont mess with HTML Tags <a href='http://google.com' target='_blank'>Google</a> is a great search engine. Here is the logo of it <img src ='http://www.google.co.in/google/intl/en_com/images/srpr/google-123-Google.png'/> Can anyone help me on how to prevent that??? Thanks in advance
  6. Try Ckeditor its good that TinyMCE and works well in IE too
  7. Recently i was Writing a Preg replace Function in PHP Here is the Code below $suchmuster = "/".$textlinksname."/i"; $replace = "<a href='".$textlinksurl."' target='_blank'>".$textlinksname."</a>"; $body = preg_replace($suchmuster,$replace,$body,200); Since the variable $body contains links begins with http:// when it replaces the matched text in URL it becomes a problem Similarly for the images too So is there any way to skip the text containing http:// using preg replace function ? Here's an example $textlinksname = 'Google'; $textlinksurl = 'http://google.com'; $body = 'Google is a great search engine. Here is the logo of it <img src =\'http://google.com/logo.jpg\'>'; $suchmuster = "/".$textlinksname."/i"; $replace = "<a href='".$textlinksurl."' target='_blank'>".$textlinksname."</a>"; $body = preg_replace($suchmuster,$replace,$body,200); // Here the Output will be // <a href='http://google.com' target='_blank'>Google</a> is a great search engine. Here is the logo of it <img src ='http://<a href='http://google.com' target='_blank'>Google</a>.com/logo.jpg'> // It replaces the Word 'Google' even in the URL(Image) as result the links and image links get broken // So, I expect the output must be like this //<a href='http://google.com' target='_blank'>Google</a> is a great search engine. Here is the logo of it <img src ='http://google.com/logo.jpg'> // Such that It replaces only text and skip the text in the URL's Thanks
  8. Therefore can you tell me how to code such one!
  9. I am Using DreamWeaver CS5 Its Good You can also use NotePad ++ an open source tool
  10. Hi, Here is the Code Have a loo here and please give me a suitable suggestion http://jhbalaji.com/php.txt Thanks
  11. @Aero: Read the thread completely As i said i will encode only the lic.php file and not other
  12. I have written a licensing system for my script and now i saved it an file called lic.php in the root folder I am going to encrypt that with ioncube when giving to a client side and i will simply include include "lic.php" to call the licensing system But the problem is when i simply include the code include "lic.php" the user can directly remove the line to get the script worked So can some one help me in coding a script inside the lic.php which will make the script to prevent from running if the code i.e, include "lic.php" is removed from the file Note that i will include the line include "lic.php" in all the php files in my script Also do you face any issues with ioncube while running?? Great Thanks!
×
×
  • 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.