GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   GFY Jobs and Services Market (https://gfy.com/forumdisplay.php?f=42)
-   -   Need a programmer (https://gfy.com/showthread.php?t=1124793)

EN1GMA 10-30-2013 04:01 AM

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! :-)

Angelo22 10-31-2013 12:53 AM

Like something that does a "Search and Replace" but automatically?

1080p Content 10-31-2013 03:48 AM

Easy stuff. Hit me up! contact at myusername dot com


All times are GMT -7. The time now is 05:53 AM.

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