Results 1 to 2 of 2

Thread: Code หา image จาก code html มาฝาก

  1. #1
    Junior Member
    Join Date
    Jun 2007
    Posts
    3


    Post

    เหอๆ เขียนเองครับ มีอะไรเพิ่มเติมตรงไหนก็ไปเพิ่มกันเองเองครับ
    เป็นการหา link ของภาพจาก html ครับ ในตัวแปร $string ก็ใส่เนื้อหา html ลงไปอันนี้ ก็แล้วแต่ว่าเราจะเอามายังไงครับ
    code อาจดูแปลกใครเก่งก็เอาไป optimize เองครับ

    [code]
    $arrTmp='';
    $format=":xxx:";
    $string=' เนื้อหา html ครับ ';
    $string=str_replace(&#39;<img&#39;, $format, $string);
    $string=str_replace(&#39;<IMG&#39;, $format, $string);
    $arrTmp=split($format,$string);
    if(count($arrTmp)>=0){
    foreach($arrTmp as $key=>$val){

  2. #2
    Junior Member
    Join Date
    Dec 2006
    Location
    PET'18
    Posts
    0


    ท่านหมายถึง [img]url[/img]
    คือโค๊ดนี้จะสกัด url ออกมาแม่นบ่

    ถ้าเป็นแบบนั้นความคิดท่านก็ดีนะ แต่ผมใช้ preg_replace อ่ะ ไมุ่ยุ่งยาก
    Code:
    &#39;/\<img src=(.*?)\>/is&#39;
    แล้วก็อ้างถึงโดยใช้ตัวแปร $1

    ปล. งง ป่ะเนี่ย

Similar Threads

  1. Replies: 4
    Last Post: 20-03-2008, 05:24 PM
  2. Replies: 2
    Last Post: 19-11-2007, 07:11 PM
  3. มีเวป Code virus มาฝาก
    By xecool in forum Viral Tech
    Replies: 2
    Last Post: 17-04-2007, 06:46 PM
  4. Hack with javascript and html code
    By donnakab in forum Hacking, Exploit Articles/Tutorial/Techniques
    Replies: 5
    Last Post: 02-11-2006, 09:15 PM
  5. พาเว็บดีๆๆ มาฝาก (Free Code)
    By studenmts in forum PHP,ASP,Javascript, Html
    Replies: 3
    Last Post: 17-10-2004, 06:55 PM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •