Activity Stream
48,167 MEMBERS
6819 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1.     
    #1
    Member
    Website's:
    megahotfiles.com

    Smile Could someone create a little script for me please :)

    I'm not the best coder, I know php and html fairly well but no where near like a real coder.

    I've created a form which creates a post for me, i'd like if I put a URL of a img in one of the input fields it will upload it to lulzimg...this probably takes some smart people 2-3min to do. Would anyone be able to assist me with it? I read that I need to use curl. I've never experienced any of that

    I went into phpuploader and tried to take its script to see if I can make it work for me...I could not

    Code: 
    	$postfields['image'] = "http://ia.media-imdb.com/images/M/MV5BMTkzNzY5OTc3Nl5BMl5BanBnXkFtZTcwNjE4NDQzMQ@@._V1._SX214_CR0,0,214,314_.jpg";
    	$postfields['submit'] = "submit";
    	$page = curl("http://lulzimg.com/app.php", $postfields, "");
    	preg_match('#http(.*)#', $page, $match);
    	$imglink = trim($match[0]);
    	echo $imglink;
    That's what I tried it would not work. Any ideas on how to help me please. I would put a vraible for $postfields instead of the URL but this was for testing purposes.

    i'm a complete nub so I really have no idea
    pisoj1 Reviewed by pisoj1 on . Could someone create a little script for me please :) I'm not the best coder, I know php and html fairly well but no where near like a real coder. I've created a form which creates a post for me, i'd like if I put a URL of a img in one of the input fields it will upload it to lulzimg...this probably takes some smart people 2-3min to do. Would anyone be able to assist me with it? I read that I need to use curl. I've never experienced any of that :( I went into phpuploader and tried to take its script to see if I can make it work for me...I Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    Maybe you can find something usefull from this:
    PHP Code: 
    <?php

    // set url of image
    $img&nbsp;&nbsp; &nbsp;= 'http://www.google.com/intl/en_ALL/images/srpr/logo1w.png';

    // open url of API
    $url&nbsp;&nbsp; &nbsp;= 'http://freedirectlink.com/tools/imageshack_api.php?img=' $img;

    // declare cURL
    $ch curl_init();
    curl_setopt($chCURLOPT_URL$url);
    curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
    $site curl_exec($ch);
    curl_close($ch);

    // decode output from API
    $out&nbsp;&nbsp; &nbsp;= json_decode($site);

    // echo result image only
    echo $out->image;

    ?>
    http://buzzknow.com/2010/08/02/remot...with-php-curl/

    http://blog.smileylover.com/remote-u...-with-phpcurl/


    EDIT: gunda316, im faster

    Defendos BETA3 Released! Thread - Official Website

  4.     
    #3
    You can call me G
    Here's the code (with a function) :

    PHP Code: 
    function postHost($url$data$cookie$credentials){
        
    $ch curl_init();
        
    curl_setopt($chCURLOPT_URL$url);
        if(
    $cookie != "")
            
    curl_setopt($chCURLOPT_COOKIE$cookie);
        if(
    $data != ""){
            
    curl_setopt($chCURLOPT_POST1);
            
    curl_setopt($chCURLOPT_POSTFIELDS$data);
        }
        if(
    $credentials != ""){
            
    curl_setopt($chCURLOPT_HTTPAUTHCURLAUTH_BASIC);
            
    curl_setopt($chCURLOPT_USERPWD$credentials);

        }
        
    //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
        
    curl_setopt($chCURLOPT_HEADER1);
        
    curl_setopt($chCURLOPT_RETURNTRANSFER,1);
        
    curl_setopt($chCURLOPT_HTTPHEADER, array('Expect:')); 
        
    $page curl_exec($ch);
        
    curl_close($ch);
        return 
    $page;
            
    }
    $img =  postHost("http://www.lulzimg.com/upload.php?submit=lulz&url=$url""""""");
    preg_match_all("/http:\/\/lulzimg.com\/[a-z0-9]+\/[a-z0-9A-Z.\-\[\]]+/"$img$matches);
    $link $matches[0][1];
    echo 
    "Your link sir: $link"
    EDIT: l0calh0st, i'm precise



    My Langotiya Yaars (Chaddi buddies): JmZ, humour, Chutad, Esotorisk, l0calhost, Daniel, Mind Freak?, TLK, Amz

  5.     
    #4
    Member
    Website's:
    megahotfiles.com
    Thank you both so much

  6.     
    #5
    Member
    l0calh0st : lulzimg doesn't return a json file after successful completion of upload..

    http://lulzimg.com/app.php
    will return the path of image in text .. so there no need to regex..
    Coding Horror Fan
    I don't read PM's frequently .

  7.     
    #6
    Member
    Website's:
    megahotfiles.com
    sorry i'm quite a noob i'm trying to use gunda's but I can't figure out what variable is ment to be the URL of the image I want uploaded. Can anyone help with that?

  8.     
    #7
    Banned
    Website's:
    sbanime.com
    Quote Originally Posted by desiboy View Post
    l0calh0st : lulzimg doesn't return a jason file after successful completion of upload..

    http://lulzimg.com/app.php
    will return the path of image in text .. so there no need to regex..
    whats a jason file?

  9.     
    #8
    Member
    Website's:
    megahotfiles.com
    NVM I FIGURED IT OUT IT'S $URL ok it's working THANKS THANKS THANKS can't say that enough lol

  10.     
    #9
    Member
    @
    SaBteCh : its not jason .. it's JSON
    Coding Horror Fan
    I don't read PM's frequently .

  11.     
    #10
    You can call me G
    @desiboy: Do add the POST/GET fields accepted by app.php would help more.



    My Langotiya Yaars (Chaddi buddies): JmZ, humour, Chutad, Esotorisk, l0calhost, Daniel, Mind Freak?, TLK, Amz

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Hiring] PHP Programmer to create script
    By ChaoscripT in forum Services
    Replies: 0
    Last Post: 12th Apr 2012, 08:49 PM
  2. Anyone can create script like this?
    By MediaStar in forum Web Application/Script Support
    Replies: 12
    Last Post: 25th Feb 2012, 12:03 PM
  3. [Hiring] Looking for any one who can create script as like Adf.ly
    By Pettrious in forum Completed Transactions
    Replies: 10
    Last Post: 21st Feb 2012, 09:00 PM
  4. [Hiring] Coder to create custom script
    By cyb3r in forum Completed Transactions
    Replies: 1
    Last Post: 15th Sep 2011, 11:01 PM
  5. [Hiring] I am looking a programmer to create a script
    By bestvideorap in forum Completed Transactions
    Replies: 3
    Last Post: 22nd Aug 2011, 03:57 PM

Tags for this Thread

BE SOCIAL