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?
how to get file included data as string?
Collapse
X
-
Get the contents of the file in a variableOriginally posted by charith7788 View Posti'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?
explode them w/ the delimerPHP Code:$file = file_get_contents('get_.txt');
Now you've have each url in the array $urls, use foreach loop if you wana list themPHP Code:$urls = explode(',', $file);
unset($file);
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
-
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?Originally posted by softwarefreak View PostGet the contents of the file in a variable
explode them w/ the delimerPHP Code:$file = file_get_contents('get_.txt');
Now you've have each url in the array $urls, use foreach loop if you wana list themPHP Code:$urls = explode(',', $file);
unset($file);
PHP Code:foreach($urls as $url) {
echo $url . "\n";
}
Comment
-
Yup, for sure!Originally posted by charith7788 View Postthanks 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?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
-
can we send our IP to the youtube? it is sending my server IPOriginally posted by charith7788 View Postthanks 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
-
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 dataOriginally posted by charith7788 View Postcan we send our IP to the youtube? it is sending my server IPI 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
-
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?Originally posted by softwarefreak View PostThe 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
Added after 20 minutes:
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,Originally posted by softwarefreak View PostThe 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
Added after 2 minutes:
some sites doing that job correctly eg : ssyoutube.com i want to build site like thatOriginally posted by softwarefreak View PostThe 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 dataLast edited by charith7788; 14.09.13, 02:11.
Comment
Comment