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)
-   -   PHP Expert needed (https://gfy.com/showthread.php?t=337903)

acctman 08-08-2004 09:56 AM

PHP Expert needed
 
hi can anyone point me in the right direction as to how i can code the following in php

1. open a text file... scan and look for a link/string that starts with the following "<http://images.domain.com//myImages/" (random characters in between) and ends with an ">" so basically find

"<http://images.domain.com//myImages/qwerty.jpg?223423&ID=userJoE>" and
strip it down to "http://images.domain.com//myImages/qwerty.jpg?223423&ID=userJoE"

then download that image to a folder. I can do this with no problem using VC.net or VB.net but does anyone have an idea as to how it's done in php?

i probably can figure out the parsing part but the image download not sure how to do that. but any help will be greatful.

grumpy 08-08-2004 09:58 AM

$handle = fopen("/tmp/inputfile.txt", "r");
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose($handle);

acctman 08-08-2004 10:10 AM

i think my biggest problem is having the script process http://images.domain.com//myImages/q...423&ID=userJoE and download the image qwerty.jpg

LazyD 08-08-2004 10:10 AM

There are many ways to do it, for the parsing part try google (search for regex) :321GFY

To write the file, this is easiest way imo :

$pictureURL = "http://www.gofuckyourself.com/skins/realitycash/images/newthread.gif";
$file = implode("", file($pictureURL));
$handle = fopen("newthread.gif", "w+b");
fwrite($handle, $file);
fclose($handle);

acctman 08-08-2004 12:39 PM

thanks for all the help

kaktusan 08-09-2004 03:35 AM

hello acctman,
i can code the script you need against a small and reasonable charge. If you want to learn more about my biz you can check http://www.kaktusancorp.com and if interested you can contact me through the form there or directly by ICQ 411661

Thanks!


All times are GMT -7. The time now is 07:11 AM.

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