Jump to content

Mattigrate

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by Mattigrate

  1. Still not working for me. $oldhtml = "http://images.4chan.org/adv/src/1288558759794.png blah blah http://images.4chan.org/sci/src/12888989591212.png blah"; $html = preg_replace("/http:\/\/images\.4chan\.org\/(.+)\/src\//s", "thread/", $oldhtml); echo $html; only outputs "thread/12888989591212.png blah"
  2. Ok, preg_replace works if I only want to replace one instance, but my string contains multiple links. I want to turn this $html = "http://images.4chan.org/adv/src/1288558759794.png blah blah http://images.4chan.org/sci/src/12888989591212.png blah" into this $html = "thread/1288558759794.png blah blah thread/12888989591212.png blah" How can I get it to replace all of them?
  3. Here's my code, a simple replace $newlink = str_replace("/http:\/\/images\.4chan\.org\/(.+)\/src\//", "thread/", "http://images.4chan.org/adv/src/1288558759794.png"); Print $newlink; I want it to output "thread/1288558759794.png", but its just giving me the link I started with. Any ideas whats wrong?
  4. So basically I want to take this input "site:google.com" And record only the "google.com" part as a variable. Any idea how to do that?
×
×
  • 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.