Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-31-2004, 01:18 PM   #1
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Help: Re" Need something that will grab two txt files from a url and combine....

to ONE txt file on a server.....


How can this be done?
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-31-2004, 01:23 PM   #2
EscortDate_Enoj
Registered User
 
Join Date: Mar 2002
Location: Norway
Posts: 87
Something like this ..

PHP Code:
<?php

$url1 
'http://domain.com/file1.txt';
$url2 'http://doman.com/file2.txt';

$data '';
$data.= file_get_contents$url1 );
$data.= file_get_contents$url2 );

$fp fopen'writable_file''w' );

if ( !
$fp )
     die(
'Unable to open file for writing');

fwrite$fp$data );
fclose$data);

echo 
'Wrote ' strlen$data ) . ' bytes to writable_file';


?>
Not tested, wrote it just now .. Might contain some syntax errors
EscortDate_Enoj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-31-2004, 01:42 PM   #3
ztik
Confirmed User
 
ztik's Avatar
 
Industry Role:
Join Date: Aug 2001
Location: Nomad
Posts: 5,196
whatever script you are using the grab them now you can just double it in the file and it will output one after the other to make a whole list
ztik is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-31-2004, 01:51 PM   #4
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Quote:
Originally posted by EscortDate_Enoj
Something like this ..

PHP Code:
<?php

$url1 
'http://domain.com/file1.txt';
$url2 'http://doman.com/file2.txt';

$data '';
$data.= file_get_contents$url1 );
$data.= file_get_contents$url2 );

$fp fopen'writable_file''w' );

if ( !
$fp )
     die(
'Unable to open file for writing');

fwrite$fp$data );
fclose$data);

echo 
'Wrote ' strlen$data ) . ' bytes to writable_file';


?>
Not tested, wrote it just now .. Might contain some syntax errors

Just tested it it worls but iget this error


Warning: fclose(): supplied argument is not a valid stream resource in /usr/home/blabla.com/htdocs/grabber.php on line 17
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-31-2004, 02:25 PM   #5
EscortDate_Enoj
Registered User
 
Join Date: Mar 2002
Location: Norway
Posts: 87
Quote:
Originally posted by juicylinks
Just tested it it worls but iget this error


Warning: fclose(): supplied argument is not a valid stream resource in /usr/home/blabla.com/htdocs/grabber.php on line 17
My bad.

Replace line 17 with

PHP Code:
fclose$fp ); 
EscortDate_Enoj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-31-2004, 02:52 PM   #6
spamofon
Confirmed User
 
Join Date: Jun 2003
Location: Toronto
Posts: 2,999
if you need a program to merge your proxy files msg me
spamofon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-31-2004, 02:53 PM   #7
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Quote:
Originally posted by spamofon
if you need a program to merge your proxy files msg me

hit me up 116999839
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.