473,804 Members | 3,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting other webpage results in to php page

Hi,

I Have a page which will take authentication from a diffrent page from
a difrent website.

My program needs to call a page like this from php page lets say:
http://www.abc.com?handshake.jsp?use...token=94399843
my php page is at www.xyz.com
based on this url's response i need to print the result on my php page?

I tried this..

$url="http://120.126.79.21:6 080/AutoPrintWeb/apvalidator.jsp ?tempid=$tempid &authtoken=$aut htoken&ipaddres s=$rmtadd";
$fp = fopen($url, 'r');
$response1=stre am_get_meta_dat a($fp);
print_r($respon se1);

The reukt is like this:

Array ( [wrapper_data] => Array ( [0] => HTTP/1.1 200 OK [1] => Server:
Apache-Coyote/1.1 [2] => Set-Cookie:
JSESSIONID=B55C A82D1790D6C0A9E 20ED1CEDBB1B9; Path=/AutoPrintWeb [3] =>
Content-Type: text/html;charset=UT F-8 [4] => Content-Length: 382 [5] =>
Date: Fri, 10 Mar 2006 10:22:41 GMT [6] => Connection: close )
[wrapper_type] => http [stream_type] => tcp_socket [mode] => r+
[unread_bytes] => 382 [seekable] => [uri] =>
http://193.186.79.21:6080/AutoPrintW...ress=127.0.0.1
[timed_out] => [blocked] => 1 [eof] => )
I need only sucesss or fail..

Plz guide me. Thanks in advance.

Sharma

Mar 10 '06 #1
2 1412
File_get_conten ts($url)
done the magic...

SHARMA

Mar 10 '06 #2
ok something is missing or what not... its driving me nuts. what is
missing???

<?

class textPNG {
var $font = 'fonts/TIMES.TTF';
var $msg = "undefined" ;
var $size = 24;
var $rot = 0;
var $pad = 0;
var $transparent = 1;
var $red = 0;
var $grn = 0;
var $blu = 0;
var $bg_red = 255;
var $bg_grn = 255;
var $bg_blu = 255;

function draw() {
$width = 0;
$height = 0;
$offset_x = 0;
$offset_y = 0;
$bounds = array();
$image = "";

$bounds = ImageTTFBBox($t his->size, $this->rot, $this->font, "W");
if ($this->rot < 0) {
$font_height = abs($bounds[7]-$bounds[1]);
} else if ($this->rot > 0) {
$font_height = abs($bounds[1]-$bounds[7]);
} else {
$font_height = abs($bounds[7]-$bounds[1]);
}

$bounds = ImageTTFBBox($t his->size, $this->rot, $this->font,
$this->msg);
if ($this->rot < 0) {
$width = abs($bounds[4]-$bounds[0]);
$height = abs($bounds[3]-$bounds[7]);
$offset_y = $font_height;
$offset_x = 0;

} else if ($this->rot > 0) {
$width = abs($bounds[2]-$bounds[6]);
$height = abs($bounds[1]-$bounds[5]);
$offset_y = abs($bounds[7]-$bounds[5])+$font_height;
$offset_x = abs($bounds[0]-$bounds[6]);

} else {
$width = abs($bounds[4]-$bounds[6]);
$height = abs($bounds[7]-$bounds[1]);
$offset_y = $font_height;;
$offset_x = 0;
}

$image = imagecreate($wi dth+($this->pad*2)+1,$heig ht+($this->pad*2)+1);

$background = ImageColorAlloc ate($image, $this->bg_red, $this->bg_grn,
$this->bg_blu);
$foreground = ImageColorAlloc ate($image, $this->red, $this->grn,
$this->blu);

if ($this->transparent) ImageColorTrans parent($image, $background);
ImageInterlace( $image, false);

ImageTTFText($i mage, $this->size, $this->rot, $offset_x+$this->pad,
$offset_y+$this->pad, $foreground, $this->font, $this->msg);

imagePNG($image );
}
}

$text = new textPNG;

if (isset($msg)) $text->msg = $msg;
if (isset($font)) $text->font = $font;
if (isset($size)) $text->size = $size;
if (isset($rot)) $text->rot = $rot;
if (isset($pad)) $text->pad = $pad;
if (isset($red)) $text->red = $red;
if (isset($grn)) $text->grn = $grn;
if (isset($blu)) $text->blu = $blu;
if (isset($bg_red) ) $text->bg_red = $bg_red;
if (isset($bg_grn) ) $text->bg_grn = $bg_grn;
if (isset($bg_blu) ) $text->bg_blu = $bg_blu;
if (isset($tr)) $text->transparent = $tr;

$text->draw();
?>

Mar 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2714
by: David Walker | last post by:
Hi I have a program which I need to interface with a webpage - the webpage will accept an input (probably a 'post' string from the program) and then will process it and needs to return a value. Is there an easy way to interface the program to do this? I have two questions: How can I call a webpage as simply as possible in c / c++ (preferably not using MFC etc) and pass a 'post' string to the page? How can I retrieve an array of values...
2
2375
by: Patrick Olurotimi Ige | last post by:
When i run the code below with stored proc :- I get only the first table results :-"templates" even if i fill the dataset with another table for example category,pages etc.. Any ideas? Store procedure below:- ------------------------
0
1359
by: tomslater2003 | last post by:
Hi! I wanted to know if there is any possibilites to export search results of a particular webpage to excel? I have a website where in search for a specific criteria. After selecting the criteria, after i click on search I would be directed to a page where the results are displayed. Now instead if i want to have the results exported to excel instead me taken to a results page. Is this possible? Can any one help me on this? I dont have...
12
4238
by: M.L. | last post by:
When loaded from my hard drive, the webpage I'm working on renders fine on IE6, Firefox 2.0.0.1, and Opera 9.02. However, after uploading it to the web there are 2 images that fail to display on those browsers. All the other images and everything else on the page render just fine. 1.) I converted one of the gif images to a jpeg but that made no difference. 2.) I validated the webpage offline using Tagcheck, and online using the...
9
1529
by: =?Utf-8?B?UmF5?= | last post by:
Have SQL server on one machine. Have IIS on another machine in same large intranet. Have website in IIS with Basic Authentication turned on and other options deselected. Have webpage (.aspx) with following connection in the web.config file <add name="NorthwindConnectionString1" connectionString="Data Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI" providerName="System.Data.SqlClient" /> Have following added to...
1
1147
by: Patrick C | last post by:
Greetings, i'm a total amateur using py 2.5 on Win XP... I posted a similar message last week and I made the suggestion, yet I'm ending up with the same problem... In my script after I ask it to print i get "None" WHY is that, what can I do to fix it? here's my script >>> import urllib2, sched, time, re
2
3584
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in uby/Rails. I started it in Perl and gave up on Perl as I went from the 'display the database information on the web page' to the 're-display the information from the database and allow the user to update the database using the web page' stage and realized...
29
4099
by: Chris Riesbeck | last post by:
I have an image with a class and the class defines a clip rectangle. In Firefox 2 and 3, and Opera 9, I can access the rectangle with document.defaultView.getComputedStyle(). But that doesn't seem to work in Safari for Windows 3, nor when I use image.currentStyle.clip in IE 7. Is there a way to do this in those browsers? Am I doing something stupid?
6
1406
denny1824
by: denny1824 | last post by:
On the webpage I use a view to fill a dataset. strCommand = "Select * from view" objConnection = New SqlClient.SqlConnection(strconnect) objCommand = New SqlClient.SqlDataAdapter(strCommand, objConnection) objCommand.Fill(dsDataSet, "view") This worked fine until the DBA messed up the view. Then my page got an error when it tried to do the fill. I need a way for my webpage to detect if the view is good or bad before getting an error...
0
10319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10303
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9132
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5508
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4282
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2978
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.