GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   A script to mass load up links. (https://gfy.com/showthread.php?t=1036681)

scottybuzz 09-03-2011 11:12 AM

A script to mass load up links.
 
Ok I have a bunch of urls. They are all affiliate urls that once you click on them will redirect to an fhg.

example:

clickref129438.example.com > fhg1.example.com


I need them in the second format and have about 100 urls that I dont want to load up individually. Is there a script to do this?

fris 09-03-2011 11:25 AM

what format do you want them in?

scottybuzz 09-03-2011 11:30 AM

just a column in excel would be best

Sly 09-03-2011 11:34 AM

You could have a script written pretty cheap to do that. Though if this is a one off thing, it might be faster just to click through all of them, 100 isn't too many. Unless someone writes the code for free, probably only a couple lines would do it.

brassmonkey 09-03-2011 11:44 AM

Quote:

Originally Posted by scottybuzz (Post 18401461)
Ok I have a bunch of urls. They are all affiliate urls that once you click on them will redirect to an fhg.

example:

clickref129438.example.com > fhg1.example.com


I need them in the second format and have about 100 urls that I dont want to load up individually. Is there a script to do this?

programmer hitting u up on icq

seeandsee 09-03-2011 12:03 PM

so you want to extract landing urls?

scottybuzz 09-03-2011 12:16 PM

Quote:

Originally Posted by Sly (Post 18401495)
You could have a script written pretty cheap to do that. Though if this is a one off thing, it might be faster just to click through all of them, 100 isn't too many. Unless someone writes the code for free, probably only a couple lines would do it.

no this would be a weekly thing with 100 + links, but i would have thought there would be something out there thats all.


thanks BM

cooldude7 09-03-2011 12:51 PM

xls and csv helps me for this, use CSVed

fris 09-03-2011 01:00 PM

put them in a text file and read it line by line and output into a csv for excel

scottybuzz 09-03-2011 01:08 PM

Quote:

Originally Posted by cooldude7 (Post 18401618)
xls and csv helps me for this, use CSVed

ok i download the program, how would i then achieve my goal please?
Quote:

Originally Posted by fris (Post 18401626)
put them in a text file and read it line by line and output into a csv for excel

:Oh crap heh? im not too technical, could you explain how to do this or point me to an article please?

woj 09-03-2011 01:16 PM

If you want I can write a quick script to do that for a few bucks, icq: 33375924

HomerSimpson 09-03-2011 04:08 PM

it's a simple curl with follow redirect
a 10 minute script..

fris 09-03-2011 08:09 PM

Quote:

Originally Posted by scottybuzz (Post 18401637)
ok i download the program, how would i then achieve my goal please?


:Oh crap heh? im not too technical, could you explain how to do this or point me to an article please?

show an example of 1 link.

do you have each url and the target url

like

http://domain1.com,http://www.domain2.com
http://domain3.com,http://www.domain5.com

etc

scottybuzz 09-03-2011 09:55 PM

no i have the first link only

http://www.dhdmedia.com/directors/wi...key=&dcdid=122
i have 100 in this format

load this up and it turns into a new link. I want to import this list and get the list of new links.

if someone can make me a script for this then please email me [email protected]

fris 09-04-2011 04:27 AM

Quote:

Originally Posted by scottybuzz (Post 18402210)
no i have the first link only

http://www.dhdmedia.com/directors/wi...key=&dcdid=122
i have 100 in this format

load this up and it turns into a new link. I want to import this list and get the list of new links.

if someone can make me a script for this then please email me [email protected]

how do you know the new link though?

where does the redirect link come from.

CurrentlySober 09-04-2011 04:43 AM

i cant afford to add even a single fucking link... :2 cents:

Let alone a 'mass' of the lil fuckers!

scottybuzz 09-04-2011 06:42 AM

Quote:

Originally Posted by fris (Post 18402484)
how do you know the new link though?

where does the redirect link come from.

i dont know the new link, i just know that it redirects and i want the new one.

fris 09-04-2011 06:45 AM

Quote:

Originally Posted by scottybuzz (Post 18402609)
i dont know the new link, i just know that it redirects and i want the new one.

ahh ok so you will have to load each one and find the new link. im sure someone can post something, bit of php and curl.

scottybuzz 09-04-2011 07:49 AM

yes correct, thanks for helping fris, usually you are the guy who can find a script for anything on the net. looks like this will have to be custom, all the best

Dvae 09-04-2011 11:59 AM

Quote:

Originally Posted by scottybuzz (Post 18402210)
no i have the first link only

http://www.dhdmedia.com/directors/wi...key=&dcdid=122
i have 100 in this format

load this up and it turns into a new link. I want to import this list and get the list of new links.

if someone can make me a script for this then please email me [email protected]


Try this:
PHP Code:

<html>
<head>
    <title>Untitled Test</title>
    <meta name="generator" content="BBEdit">
</head>

<body>
<font size=1 face=verdana>

<?php
$pages_array 
= array(
"http://www.dhdmedia.com/directors/wifeycash?dcwid=124465&dcokey=&dcdid=120",
"http://www.dhdmedia.com/directors/wifeycash?dcwid=124465&dcokey=&dcdid=119",
"http://www.dhdmedia.com/directors/wifeycash?dcwid=124465&dcokey=&dcdid=118",
);


function 
follow_redirect($url){
   
$redirect_url null;

   if(
function_exists("curl_init")){
      
$ch curl_init($url);
      
curl_setopt($chCURLOPT_HEADERtrue);
      
curl_setopt($chCURLOPT_NOBODYtrue);
      
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
      
$response curl_exec($ch);
      
curl_close($ch);
   }
   else{
      
$url_parts parse_url($url);
      
$sock fsockopen($url_parts['host'], (isset($url_parts['port']) ? (int)$url_parts['port'] : 80));
      
$request "HEAD " $url_parts['path'] . (isset($url_parts['query']) ? '?'.$url_parts['query'] : '') . " HTTP/1.1\r\n";
      
$request .= 'Host: ' $url_parts['host'] . "\r\n";
      
$request .= "Connection: Close\r\n\r\n";
      
fwrite($sock$request);
      
$response fread($sock2048);
      
fclose($sock);
   }

   
$header "Location: ";
   
$pos strpos($response$header);
   if(
$pos === false){
      return 
false;
   }
   else{
      
$pos += strlen($header);
      
$redirect_url substr($response$posstrpos($response"\r\n"$pos)-$pos);
      return 
$redirect_url;
   }
}
for(
$idx 0$idx count($pages_array); ++$idx) {
$idx_cnt $idx+1;
$url = ($pages_array[$idx]);
// 
// echo '<ol>';
while(($newurl follow_redirect($url)) !== false){
//    echo '<li>', $url, '</li>';
   
echo $url' ';
   
$url $newurl;
}
// echo '</ol>';

 
echo '<a href="'$url'">'$url'</a><br>';
//echo ' $url';
}
?>

</font></body>
</html>


nextri 09-05-2011 12:58 AM

Hey, not bad. someone coding for free, and being helpful on gfy. Who would have thought?


All times are GMT -7. The time now is 07:44 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123