PHP Expert needed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acctman
    Confirmed User
    • Oct 2003
    • 2840

    #1

    PHP Expert needed

    hi can anyone point me in the right direction as to how i can code the following in php

    1. open a text file... scan and look for a link/string that starts with the following "<http://images.domain.com//myImages/" (random characters in between) and ends with an ">" so basically find

    "<http://images.domain.com//myImages/qwerty.jpg?223423&ID=userJoE>" and
    strip it down to "http://images.domain.com//myImages/qwerty.jpg?223423&ID=userJoE"

    then download that image to a folder. I can do this with no problem using VC.net or VB.net but does anyone have an idea as to how it's done in php?

    i probably can figure out the parsing part but the image download not sure how to do that. but any help will be greatful.
  • grumpy
    Too lazy to set a custom title
    • Jan 2002
    • 9870

    #2
    $handle = fopen("/tmp/inputfile.txt", "r");
    while (!feof($handle)) {
    $buffer = fgets($handle, 4096);
    echo $buffer;
    }
    fclose($handle);
    Don't let greediness blur your vision | You gotta let some shit slide
    icq - 441-456-888

    Comment

    • acctman
      Confirmed User
      • Oct 2003
      • 2840

      #3
      i think my biggest problem is having the script process http://images.domain.com//myImages/q...423&ID=userJoE and download the image qwerty.jpg

      Comment

      • LazyD
        Confirmed User
        • Aug 2004
        • 102

        #4
        There are many ways to do it, for the parsing part try google (search for regex)

        To write the file, this is easiest way imo :

        $pictureURL = "http://www.gofuckyourself.com/skins/realitycash/images/newthread.gif";
        $file = implode("", file($pictureURL));
        $handle = fopen("newthread.gif", "w+b");
        fwrite($handle, $file);
        fclose($handle);
        Calidi studio
        http://www.calidi.com
        ICQ: #18466283

        Comment

        • acctman
          Confirmed User
          • Oct 2003
          • 2840

          #5
          thanks for all the help

          Comment

          • kaktusan
            Confirmed User
            • Mar 2003
            • 334

            #6
            hello acctman,
            i can code the script you need against a small and reasonable charge. If you want to learn more about my biz you can check http://www.kaktusancorp.com and if interested you can contact me through the form there or directly by ICQ 411661

            Thanks!


            Superior Blogging Scripts | Porn Blog Space - not just another free blog hosting!

            Comment

            Working...