how to get file included data as string?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to get file included data as string?

    i've got a small file which gives the urlencoded variables with values in comma separated pattern(given below), i want to read it as working seperated string variable from given separated comma pattern as a list of urls, how does it make?
    Attached Files

    #2
    Originally posted by charith7788 View Post
    i've got a small file which gives the urlencoded variables with values in comma separated pattern(given below), i want to read it as working seperated string variable from given separated comma pattern as a list of urls, how does it make?
    Get the contents of the file in a variable

    PHP Code:
    $file file_get_contents('get_.txt'); 
    explode them w/ the delimer
    PHP Code:
    $urls explode(','$file);
    unset(
    $file); 
    Now you've have each url in the array $urls, use foreach loop if you wana list them

    PHP Code:
    foreach($urls as $url) {
    echo 
    $url "\n";

    I need some facebook likes, can you please help me
    http://facebook.com/softwarefreakin
    I noticed social media is really powerful
    Well DONE is better than well SAID

    Comment


      #3
      Originally posted by softwarefreak View Post
      Get the contents of the file in a variable

      PHP Code:
      $file file_get_contents('get_.txt'); 
      explode them w/ the delimer
      PHP Code:
      $urls explode(','$file);
      unset(
      $file); 
      Now you've have each url in the array $urls, use foreach loop if you wana list them

      PHP Code:
      foreach($urls as $url) {
      echo 
      $url "\n";

      thanks bro. I'll check that, will the file open if it is in a remote location? I got get.text from www.youtube.com/get_video_info?video_id=xxxx does the file_get_contents function work with the url?

      Comment


        #4
        Originally posted by charith7788 View Post
        thanks bro. I'll check that, will the file open if it is in a remote location? I got get.text from www.youtube.com/get_video_info?video_id=xxxx does the file_get_contents function work with the url?
        Yup, for sure!
        I need some facebook likes, can you please help me
        http://facebook.com/softwarefreakin
        I noticed social media is really powerful
        Well DONE is better than well SAID

        Comment


          #5
          Originally posted by softwarefreak View Post
          Yup, for sure!
          hehe thanks a lot bro its working.

          Comment


            #6
            Originally posted by charith7788 View Post
            thanks bro. I'll check that, will the file open if it is in a remote location? I got get.text from www.youtube.com/get_video_info?video_id=xxxx does the file_get_contents function work with the url?
            can we send our IP to the youtube? it is sending my server IP

            Comment


              #7
              Originally posted by charith7788 View Post
              can we send our IP to the youtube? it is sending my server IP
              The thing you want to do is known as IP spoofing, you can pass user ip via curl but that wont work cuz your server is the bridge between the user & youtube, youtube will send the data back to ip who sends the request, if its not your server ip, then you'll never get the data
              I need some facebook likes, can you please help me
              http://facebook.com/softwarefreakin
              I noticed social media is really powerful
              Well DONE is better than well SAID

              Comment


                #8
                Originally posted by softwarefreak View Post
                The thing you want to do is known as IP spoofing, you can pass user ip via curl but that wont work cuz your server is the bridge between the user & youtube, youtube will send the data back to ip who sends the request, if its not your server ip, then you'll never get the data
                yes its true, i got the data (download links as 3gp mp4 flv webm ,stream url,thumbanail url,..ect ) with server ip. but all the given download links are created with server ip, so i want to download the videos but youtube don't let me to download, becouse download request sends by my ip, then 1st & 2nd ips are different so that download link is not working by my side, thats why i want to spoof my ip through curl, file get contens function also sends server url. Have any idea?

                Added after 20 minutes:

                Originally posted by softwarefreak View Post
                The thing you want to do is known as IP spoofing, you can pass user ip via curl but that wont work cuz your server is the bridge between the user & youtube, youtube will send the data back to ip who sends the request, if its not your server ip, then you'll never get the data
                i have to pass my browser ip through curl or open the download link with curl but 2nd idea is depends on video length & eat server bandwidth,

                Added after 2 minutes:

                Originally posted by softwarefreak View Post
                The thing you want to do is known as IP spoofing, you can pass user ip via curl but that wont work cuz your server is the bridge between the user & youtube, youtube will send the data back to ip who sends the request, if its not your server ip, then you'll never get the data
                some sites doing that job correctly eg : ssyoutube.com i want to build site like that
                Last edited by charith7788; 14.09.13, 02:11.

                Comment

                Working...
                X