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?
Started on the old forum in September 2013 · view the original in the archive · old links redirect here
charith7788 wrote: 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
$file = file_get_contents('get_.txt');
explode them w/ the delimer
$urls = explode(',', $file);
unset($file);
Now you've have each url in the array $urls, use foreach loop if you wana list them
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
softwarefreak wrote: Get the contents of the file in a variable
$file = file_get_contents('get_.txt');explode them w/ the delimer
$urls = explode(',', $file); unset($file);Now you've have each url in the array $urls, use foreach loop if you wana list them
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?
charith7788 wrote: thanks bro. I'll check that, will the file open if it is in a remote location? I got get.text from http://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
charith7788 wrote: thanks bro. I'll check that, will the file open if it is in a remote location? I got get.text from http://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
charith7788 wrote: 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
softwarefreak wrote: 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:
softwarefreak wrote: 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:
softwarefreak wrote: 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