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
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Looking for work? Have a job and looking for that right person to fill your position? Post your resumes and open positions here! Does your company provide a service that the industry needs? Post your service here. Video Editing, blog writing, encoding, programming, the works.

 
Thread Tools
Old 10-30-2013, 04:01 AM   #1
EN1GMA
Confirmed User
 
EN1GMA's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 1,251
Need a programmer

Hello guys,

Maybe someone can help me...
I have thousands of files to edit in my server and this will consume me lots of hours editing all files manually one by one.
So, I had an idea but I don't know if is possible to make... to create a tools to edit all my files automatically.

This is the tree view of directory/files of my website:
Code:
directory3
directory3/file.php
...
directory4
directory4/file.php
...
links
link/sitename.php
...
This is the content of /directory3/ and /directory4/ files:
Code:
<?php
echo '<a rel="nofollow" href="http://www.domain.com/link/sitenameA.php" target="_blank"><span>Site Name</span></a>
<a rel="nofollow" href="http://www.domain.com/link/sitenameB.php" target="_blank"><span>Site Name</span></a>
<a rel="nofollow" href="http://www.domain.com/link/sitenameC.php" target="_blank"><span>Site Name</span></a>';
?>
This is the content of all files inside the links directory:
Example: http://www.domain.com/link/sitenameA.php
Code:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://affdomain.com/?id=code" );
?>
What I need to change is the URL inside of the href="" of all /directory3/ and /directory4/ files.

From:
Code:
<a rel="nofollow" href="http://www.domain.com/link/sitenameA.php" target="_blank"><span>Site Name</span></a>
To:
Code:
<a rel="nofollow" href="http://affdomain.com/?id=code" target="_blank"><span>Site Name</span></a>
....................

So, is possible to create some kind of script that grabs the Location of the link/sitenameA.php file:
Code:
http://affdomain.com/?id=code
And replace with the URL inside of href="" of all /directory3/ and /directory4/ files?
Code:
http://www.domain.com/link/sitenameA.php
Sorry if the post is a little confuse but is a little difficult to explain.
But if you didn't understood, please let me know and I will try to explain better.

Waiting for your replies, thanks! :-)
EN1GMA is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-31-2013, 12:53 AM   #2
Angelo22
Writer
 
Angelo22's Avatar
 
Industry Role:
Join Date: Feb 2007
Posts: 3,123
Like something that does a "Search and Replace" but automatically?
__________________
MAKE MORE MONEY FROM YOUR WEB TRAFFIC - 15% BONUS

And contact me if you need high quality translating and writing work done - angelo22 (AT) gmail (DOT) com
Angelo22 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-31-2013, 03:48 AM   #3
1080p Content
Registered User
 
Join Date: Mar 2010
Posts: 85
Easy stuff. Hit me up! contact at myusername dot com
1080p Content 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



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.