473,329 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,329 software developers and data experts.

problem with subroutines

118 100+
Hi,

I think that I need subroutines written in another programming language that I can call from PHP to do the following:

1. Input the directory name and return a list of file names.

2. Input an HTML file name and return its contents in a string of HTML code.

3. Input a JPEG file name and return its height and width.

4. Input a JPEG file name and the desired height and width, and display it at the current point in the output with the given height and width.

plz give the solution for that and tell the logic for how to start.
Jun 12 '08 #1
2 1080
Atli
5,058 Expert 4TB
You don't need another programming language for any of that. There are even built in functions for all of this.

1. glob
2. file_get_contents
3. getimagesize
4. This is simple. Simply echo a <img> tag with the proper height, width and src parameters set.

I would try searching for the functions you need in the manual before you start trying to build your own.
There are a lot of functions built into PHP. Chances are the one you need already exists.
Jun 12 '08 #2
Here's a class to fetch a web page, in case your PHP configuration doesn't allow file_get_contents() to open URLs.

http://www.nashruddin.com/fetching-a...-php-code.html
Jun 20 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: joe | last post by:
Hello: I am using IIS 5.0, ASP and VBScript. I am puzzled by recurrences of errors when I nest subroutines, and I'd like to know if there are rules for that which I don't know. Would functions...
5
by: NM | last post by:
Hi All, I am having a peculiar problem. I used to link between intel fortran 7.0 and g++ without any problem. Now the intel compiler is upgraded to version 9.0 and I am getting segmenatation...
9
by: Robert Wing | last post by:
I support an MS Access application in which errors are trapped using the On Error statement. Just recently, the users of this system have experienced run-time error number 3021 on a random basis. ...
7
by: Microsoft | last post by:
I'm not sure where to physically place my subroutines in vb.net I get namespace and not declared errors... Imports System Imports System.Management Public Class Form1
3
by: OpticTygre | last post by:
I have a class, ProcessFiles, with several subroutines it runs for each type of file I want to "process." First, I check directories for files. Then, based on the filenames of those I find in...
5
by: Victor | last post by:
In ASP, if I define a subroutine as private Private Sub mySubroutine(arg1, arg2) I understand that the variables I define inside the subroutine are local only to the subroutine. If the same...
1
by: Wijaya Edward | last post by:
Hi, How does one benchmark multiple subroutines in Python? Is there a built-in library for that? -- Regards, Edward WIJAYA SINGAPORE
1
by: hanhaner | last post by:
hey, there I am new to Python and C++. Now I am trying to call some fortran subroutines in python code. I was told the good way is to write a c++ interface. I am not quite sure how to do it. ...
10
by: liz0001 | last post by:
Hi, I need to access an .asp subroutine file from a subdomain. i.e. the website is at www.domain.com and I want to access the same subroutines on the subdomain mobile.domain.com. The...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.