webdevRefinery Forum: Mark - Viewing Profile - webdevRefinery Forum

Jump to content

Reputation: 9 Neutral
Group:
Members
Active Posts:
778 (0.66 per day)
Most Active In:
General Discussion (223 posts)
Joined:
08-March 10
Profile Views:
5783
Last Active:
User is offline May 11 2013 06:06 PM
Currently:
Offline

My Information

Age:
Age Unknown
Birthday:
December 13
Gender:
Male Male
Location:
Sacramento, CA, USA
Expertise:
HTML
CSS

Contact Information

E-mail:
Click here to e-mail me

Latest Visitors

Posts I've Made

  1. In Topic: Script to Manipulate a Poll?

    19 September 2012 - 07:48 PM

    I made a curl script that submits the request, it had all the header information and even a proxy but it didn't work :/

    <?php
    
    function do_curl($url, $proxy)
    {
        $curl = curl_init($url);
    
        if($proxy)
        {
            curl_setopt($curl, CURLOPT_PROXY, $proxy);
        }
    
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        
    curl_setopt($curl ,CURLOPT_HTTPHEADER, array('Host:livewire.kcra.com','X-Requested-With:XMLHttpRequest','Referer:http://livewire.kcra.com/Event/High_School_Playbook_-_Games__Polls','Accept-Language:en-GB,en-US;q=0.8,en;q=0.6','Accept-Encoding:gzip,deflate,sdch','Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3','Accept:application/json, text/javascript, */*; q=0.01','Connection:keep-alive','User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1'));
    
    
    
        $ret = curl_exec($curl);
    
        curl_close($curl);
    
        return $ret;
    } 
    
    
    do_curl('http://livewire.kcra.com/api/rest/poll/12343/vote/45367?format=json', '113.240.130.243:8080'); 
    
    
    ?>		
    


    That is a public proxy so I don't care if its posted. Yes, I did try putting in different headers, still no success. This really confused me :/
  2. In Topic: Script to Manipulate a Poll?

    18 September 2012 - 01:48 AM

    I'd rather it be using PHP because the test website I'm experimenting on is using a free host (I know, I know, not recommended) but I'm using it for now so it would be better using PHP in my case. Thanks.



    edit:


    I found that when clicked, the radio button sends a GET request to http://livewire.kcra...367?format=json but I don't know what to do with that. I don't like that when the radio button is clicked, it acts like a submit button, so there is no submit button... :/
  3. In Topic: Script to Manipulate a Poll?

    18 September 2012 - 12:21 AM

    Sorry for the double post, but would cURL be the only way to do this?
  4. In Topic: Script to Manipulate a Poll?

    17 September 2012 - 10:27 PM

    View PostTheMaster, on 17 September 2012 - 10:04 PM, said:

    Illegal/immoral much? :P

    But if you do want to do it, learn about the cURL extension for PHP.


    Don't think its illegal but it should be a good way of learning something new while not really harming others and helping my school at the same time ;)

    Thanks for the cURL suggestion though, I'll check that out.

Comments

Mark has no profile comments yet. Why not say hello?


Enter your sign in name and password


Sign in options
  Or sign in with these services