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)
-   -   Help: FHG exporter tool (text to HTML) (https://gfy.com/showthread.php?t=852790)

loreen 09-04-2008 02:43 PM

Help: FHG exporter tool (text to HTML)
 
Hello,

I'm looking for a software / script to replace the one from www.fhglink.com (that stopped working about 1 year ago on all my computers).

Basically, I want to enter FHG data like description|url|thumb and get the HTML code out of it.

Anyone? :arcadefre

GrouchyAdmin 09-04-2008 02:53 PM

That's pretty easy. Here's a really dumb throwaway nearly-one-liner.
PHP Code:

<?php
$data
=explode("\n",file_get_contents("anus.txt"));
if (
$data)
  foreach (
$data as $lines) {
    
$what explode("|"$lines);
    echo 
'<img src="'.$what[2].'"><br><a href="'.$what[1].'">'.$what[0].'</a>'
  
}
?>


loreen 09-04-2008 03:28 PM

http://i37.tinypic.com/6rn9k0.jpg

Thank you (after adding a missing ; it worked like a charm)! :)

GrouchyAdmin 09-04-2008 03:49 PM

D'awww, thanks.

I wouldn't consider that production quality; it was just a quick hack.
Actual error, bounds checking, and fgetcsv() would be much better.

fatfoo 09-04-2008 04:58 PM

yeah, GrouchyAdmin has the solution......


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

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