Can u create this script/software

Ayomav

Regular Member
Joined
Nov 23, 2011
Messages
250
Reaction score
19
Hello,

I have list of links, these links redirect to some other site.I have list of links in column A in csv file, I want the script to generate list of links that it redirects to in column B.

Anyone knows any script or imacros that can do this or anyone willing to create and share in this thread ? Thanks and rep will be given.

Thanks
 
PHP:
<?php
$file = file('file of ruls');
foreach($file as $single)
{
$get = array(get_headers($single));
foreach($get[0] as $done)
{
    preg_match('/Location:(.*)/is',$done,$red_url);
    echo trim($red_url[1]);
}
}

?>

enjoy it ;)
 
PHP:
<?php
$file = file('file of ruls');
foreach($file as $single)
{
$get = array(get_headers($single));
foreach($get[0] as $done)
{
    preg_match('/Location:(.*)/is',$done,$red_url);
    echo trim($red_url[1]);
}
}

?>
enjoy it ;)

Hey, it's showing me this error -

Warning: file(file of ruls) : failed to open stream: No such file or directory in /home/user/public_html/domain.com/a.php on line 2

Warning: Invalid argument supplied for foreach() in /home/user/public_html/domain.com/a.php on line 3
 
place the csv file in this location

/home/user/public_html/domain.com/

or use the fill path in $file = file('file of ruls');
 
Back
Top