Ajax PHP Forms - Willing to pay :)

Discussion in 'JavaScript' started by !Unreal, Feb 4, 2009.

  1. #1
    I need to use ajax to make this whole process smoother.

    Here is a demo: http://www.theflickzone.com/dev/

    If anyone can do this for me I will pay a few $ via paypal to say thanks :)

    Contents of index.html
    
    <form action="return.php" method="POST">
    <p>IMDB URL: <input type="text" name="imdb" autocomplete="off"></p>
    <p>Links(line by line):
    <br />
    <textarea cols="50" rows="5" name="links" autocomplete="off"></textarea></p>
    <p><input type="submit" /></p>
    </form>
    
    HTML:
    Contents of return.php
    
    <?php
    function get_inner_string($a,$b,$c)  
    {  
      $y = explode($b,$a);  
      $x = explode($c,$y[1]);  
      return $x[0];  
    }
    
    $imdb = $_POST['imdb'];
    $openIMDB = file_get_contents($imdb);
    $findTitle = get_inner_string($openIMDB, '<b>', '</b>');
    
    $posterUrl = $_POST['imdb'];
    
    $posterUrl = preg_replace( 
        '~http://www.imdb.com/title/tt\d+/~', 
        'http://www.theflickzone.com/IMDBPoster/getPoster.php?url=$0', 
        $posterUrl
    );
    
    $posterUrl = preg_replace( 
        '~url=http://www.imdb.com~', 
        'url=', 
        $posterUrl
    );
    
    echo '[IMG]' . $posterUrl . '[/IMG]';
    echo '<br />';
    echo '<br />';
    echo '[IMDB]'.$imdb.'[/IMDB]';
    echo '<br />';
    $findPlot = get_inner_string($openIMDB, '<h5>Plot:</h5>', '<a class');
    
    echo '[QUOTE]' . $findPlot . '[/QUOTE]';
    echo '<br />';
    $links = explode("\n", $_POST['links']); 
    $count = count($links);
    if ($count == '1'){
    	$linksN = implode(\n, $links);
    	echo '<p>[FULL]' . $linksN . '[/FULL]</p>';
    }
    else {
    for($i=0;$i<$count;$i++)
    {
     echo '[PART="'.($i+1).'"]'.$links[$i].'[/PART] <br />';
     }
    }
    ?>
    
    PHP:
     
    !Unreal, Feb 4, 2009 IP
  2. SGBoise

    SGBoise Peon

    Messages:
    647
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I can do this for you. $15 if you are interested.

    I have several ajax features on my TopMediaScript so I have some pretty knowledge on what you need.
     
    SGBoise, Feb 4, 2009 IP
  3. !Unreal

    !Unreal Well-Known Member

    Messages:
    1,671
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    165
    #3
    Thanks but someone else has already done it for me. :)
     
    !Unreal, Feb 4, 2009 IP
  4. buldozerceto

    buldozerceto Active Member

    Messages:
    1,137
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    88
    #4
    buldozerceto, Feb 4, 2009 IP